what text editor did you use to write the script?
-----Original Message----- From: Burke, Thomas G. [mailto:[EMAIL PROTECTED] Sent: 03 April 2003 14:22 To: '[EMAIL PROTECTED]' Subject: RE: backup script -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 if I put in the #!/bin/sh, I just get the following: bash: ./backup: No such file or directory ugh. I don't get it. I've seen this problem when things have the wrong style of quote before, but I don't see that as a problem here... or is it? - -----Original Message----- From: Bret Hughes [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 02, 2003 9:58 PM To: [EMAIL PROTECTED] Subject: RE: backup script 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 -----BEGIN PGP SIGNATURE----- Version: PGP Personal Privacy 6.5.3 iQA/AwUBPow1jNPjBkUEZx5AEQIsJQCg84MBpU29Ieu549yKRM/Ip1VpEKwAoKQY RDInbUJiPbUQ3yE0r2biWrJA =euK7 -----END PGP SIGNATURE----- -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list -------------------------------------------------------- This email is confidential and intended solely for the use of the person(s) ('the intended recipient') to whom it was addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of the Paterson Institute for Cancer Research or the Christie Hospital NHS Trust. It may contain information that is privileged & confidential within the meaning of applicable law. Accordingly any dissemination, distribution, copying, or other use of this message, or any of its contents, by any person other than the intended recipient may constitute a breach of civil or criminal law and is strictly prohibited. If you are NOT the intended recipient please contact the sender and dispose of this e-mail as soon as possible. -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list