Re: FWD: About Bash Script

2010-02-16 Thread Curtis
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!

Re: FWD: About Bash Script

2010-02-16 Thread Curtis
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

Re: FWD: About Bash Script

2010-02-16 Thread Curtis
Thanks Greg for the resource material! I'm making changes now

Re: FWD: About Bash Script

2010-02-16 Thread Curtis
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

Re: FWD: About Bash Script

2010-02-16 Thread Mart Frauenlob
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 > >

Re: FWD: About Bash Script

2010-02-16 Thread pk
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.

Re: FWD: About Bash Script

2010-02-16 Thread pk
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 ...

Re: bash-4.1: incorrect substitution of extended glob pattern when recalled with !$

2010-02-16 Thread Chet Ramey
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