home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5190 < prev    next >
Encoding:
Internet Message Format  |  1992-12-30  |  1000 b 

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