home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!wshb!calvin
- From: calvin@wshb.csms.com ( WSHB employee)
- Newsgroups: comp.unix.shell
- Subject: trap
- Message-ID: <1860@wshb.csms.com>
- Date: 30 Dec 92 16:04:55 GMT
- Organization: WSHB, Herald Broadcasting Syn., Inc., Cypress Creek, SC, USA
- Lines: 18
-
-
- I am writting a program here and included a trap
- statement that went like this.
-
- trap "rm $LOCATE1/LCK..Order $LOCATE3/$$.*; clear; exit" 0 1 2 9 15
-
- I later give an exit statement that says exit 3. What ends up
- happening is that the trap statement is executed and it rm's the files.
- I didn't want it to remove the files on this exit code. Is my trap
- messed up, am I giving an incorrect exit code, or does the computer
- have a boo boo? Any help would be apprecitated. Thanks!
-
-
- --
- ...calvin@wshb.csms.com. If it wern't for bad luck,
- kamikazi"calvin" I'd have no luck at all!
- >From a warped mind comes a warped product.
- These are not my employers opinions. In fact I don't know if there mine!
-