[ale] Exiting multi-block shell scripts
Kenneth W Cochran
kwc at world.std.com
Wed Jun 28 09:15:15 EDT 2000
>Date: Wed, 28 Jun 2000 09:02:07 -0400 (EDT)
>From: Danny Cox <danny at compgen.com>
>Subject: Re: [ale] Exiting multi-block shell scripts
>
>On Wed, 28 Jun 2000, Kenneth W Cochran wrote:
>> Indeed... But "trap 'exit 0' 0" wouldn't stop it...
>> I guess I'm still trying to grok some of the picky syntax-stuff... :)
>
> Yeah, some of the older shells would loop on this. They'd hit
>the exit, then run the trap command, which was an exit, so they'd run
>the trap command, ...
Interesting. "You'd think" this sort of behavior would be
"standardized" somehow... (??) Probably is, nowadays...
> Try: trap 'trap "" 0; exit 0' 0, which will disable the sig 0
>trap when it runs. It should exit then.
I just used "trap 'exit 0' 0 1 2 3 15" & that works ok.
Good Book reference? :)
Only one I've seen is _Unix_Shell_Programming_ by Kochan & Wood.
Something like this (shell programming) might make a nice
meeting topic sometime. (Even if Done Before... :)
>Danny
Thanks!
-kc
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
More information about the Ale
mailing list