October 25th, 2000, 06:23 PM
Join Date: Jul 2000
Time spent in forums: 2 h 18 m 58 sec
Reputation Power: 14
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?