October 25th, 2000, 05:23 PM
I need to write a simple shell script that executes commands (that a cron job will then run):
1. copy some files
2. tar these files
3. zip these files
4. email me the .zip file
5. delete tar file
6. delete zip file
I want to ensure that each command is executed only after the previous command is completely finished.
1. Are commands in shell scripts executed sequantially as I want or do I have to add some operator to check completion of prvious task?
2. Do I need to "quote" the commands or will just specifying the command interpreter and the commands be enough?
October 26th, 2000, 02:40 PM
Well, I think it's run sequentially, but don't quite me on it.
I think that if you just use something like this:
cp /blah/blah.txt /test/balh.txt
You wont need to use any quotes.