On Wed, 2003-04-02 at 13:04, Burke, Thomas G. wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Here's the error when I run the script as is: > > [EMAIL PROTECTED] /backup]# ./backup > : command not found > : No such file or directory > : command not found > ./backup: ./backup: line 7: syntax error: unexpected end of file > > Here's the script: > > BACKUP_DIRECTORY=/backup/tomii > SOURCE_DIRECTORY=/ > > cd $SOURCE_DIRECTORY > > for i in * ; do tar -zcvf "$BACKUP_DIRECTORY/$i.tgz" $i ; done > >
I don't see anything wrong with this except we don't know what shell it is running in. I usually put #!/bin/bash as the first line. yep just tested on my machine and killed it before I filled up my drive :) no errors [EMAIL PROTECTED] bhughes]$ cat testscript BACKUP_DIRECTORY=/home/bhughes/backup/tomii SOURCE_DIRECTORY=/ cd $SOURCE_DIRECTORY for i in * ; do tar -zcvf "$BACKUP_DIRECTORY/$i.tgz" $i ; done [EMAIL PROTECTED] bhughes]$ hmmm. Bret -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list