Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: KSH Scripting Questions
I use this in one of my scripts. Is this what you are looking for?
# Make sure temp file get removed.
trap "rm -f $file; exit" 0 1 2 3 4 5 6 7 8 10 11 12 13 15 16 17
HTH,
John
>>> kgel_at_ppoone.com 12/10/01 08:55AM >>>
I have a kshell script that I am trying to perform an oracle operation.
Everything works fine in the script excpet cleanup.
One section of the script spools off a monitor job that watches the script for any failures by use of flag files and file checking. This all works well UNTIL the main program ends before the monitor programs.
What happens is , that when the main program ends, the monitor closes down because it was spawned by the main program. Because of this, no all the flag files are getting deleted.
I need to know the proper trap to set and its syntax to catch an ending program so that I can get it to delete the flag files.
Anyone have any ideas ??
Thanks
Kevin
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Kevin Lange INET: kgel_at_ppoone.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: John Carlson INET: jcarlson_at_CJ.COM Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Dec 10 2001 - 13:00:16 CST