From: Douglas K. <kl...@he...> - 2008-07-21 15:57:20
|
> On Fri, 18 Jul 2008 19:54:16 +0100, Douglas Kline > <kl...@he...> wrote: > > > { (exit 1); exit 1; } > > > > What function does the exit in a sub-shell serve? > > Google found this: > > http://unix.derkeiler.com/Newsgroups/comp.unix.shell/2006-02/msg01194.html What search string did you use to find that? That may be more interesting than my original question. Reading that page, I found the explanation that an exit through a trap might give a different exit status with a simple exit 1 because the exit status will be that of a command run in the trap and the more complex { (exit 1); exit 1; } preserves the intended exit status. But I don't understand that. It seems to me that if that unintended exit status obtains with the simple command, it will with the more complex command too. Evidently either I misunderstood the Web page or I'm missing something. Douglas ======== Douglas M. Kline kl...@he... |