I actually re-wrote it and got it working.
Thanks for the suggested reading Mart, i'll definitely look those
over.
Thanks for all the help!
Thanks pk!
That's the same thin Greg told me.
#!/bin/bash
if [! -e b.txt];
then
mv a.txt b.txt
exit
fi
#The previous commands checks to see if b.txt is NOT already there, if
NOT, it renames a.txt to b.txt
#If the script gets here, b.txt EXISTS..
# does_exist is a recursive fu
Thanks Greg for the resource material! I'm making changes now
Here's what I have but i'm getting some errors
#!/bin/bash
if ! (-e b.txt);
then
mv a.txt b.txt
exit
fi
#The previous commands checks to see if b.txt is NOT already there, if
NOT, it renames a.txt to b.txt
#If the script gets here, b.txt EXISTS..
# does_exist is a recursive
On 16.02.2010 19:52, Curtis wrote:
> Thanks pk!
>
> That's the same thin Greg told me.
>
> #!/bin/bash
>
>
> if [! -e b.txt];
if [[ ! -e b.txt ]; then ...; fi
or
if [[ ! - b.txt ]]
then
...
fi
you only need the semicolon if you omit the newline.
>
> then
>
> mv a.txt b.txt
>
> exit
>
>
Curtis wrote:
> if [! -e b.txt];
Please note that should literally be
if [ ! -e b.txt ];
NOT
if [! -e b.txt];
Try running the latter and you'll get errors.
Curtis wrote:
> Here's what I have but i'm getting some errors
>
> #!/bin/bash
>
>
> if ! (-e b.txt);
ITYM
if [ ! -e b.txt ]; then
...
On 2/13/10 6:03 PM, Rajeev V. Pillai wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
> -DCONF