Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Executing script on exit
Name: hismail Date: April 17, 2007 at 23:16:03 Pacific OS: DG/UX CPU/Ram: 4gig/3gig Product: DG
Comment:
Hi I would like to execute a script on exit for example: #!/bin/sh
./script
when I type exit the "./script: must excute on the screen
Summary: All you need to do is to explicitly exit with "exit 0" such as: #!/bin/sh subscript1.sh exit 0 If you omit that exit, then the main script will exit with the exit code of the last command that it ran ...
Summary: Hi I am working on a script with a loop which calls a second script within the loop. If there is an error within the second script, I exit using 'exit 1' command. But this only ends my second script, ...