Re: Error code from a shell pipeline.

2003-10-30 Thread Beni Cherniavsky
Shlomi Fish wrote on 2003-10-24: > On Fri, 24 Oct 2003, Beni Cherniavsky wrote: > > > Also, it mysteriously seems to be lost after every command in > > interactive mode: > > > > $ true | false | true | false > > $ echo [EMAIL PROTECTED] > > 0 > > > Works for me: > > shlomi:~$ true | false | false

Re: Error code from a shell pipeline.

2003-10-25 Thread Oron Peled
On Saturday 25 October 2003 14:47, Oleg Goldshmidt wrote: > Now, I don't know what the rationale for bash behaviour is. It seems > to me that the way tcsh behaves is pretty useful. Probably some POSIX compliance requirement. I'm too lazy to search now "GO-SOLO - The single Unix specification", but

Re: Error code from a shell pipeline.

2003-10-25 Thread Oleg Goldshmidt
Tzafrir Cohen <[EMAIL PROTECTED]> writes: > On Fri, Oct 24, 2003 at 10:47:22PM +0200, Oleg Goldshmidt wrote: > > Shlomi Fish <[EMAIL PROTECTED]> writes: > > > > > On Fri, 24 Oct 2003, Beni Cherniavsky wrote: > > > > > > > Shlomi Fish wrote on 2003-10-12: > > > > > > > > > I want that if one of

Re: Error code from a shell pipeline.

2003-10-24 Thread Tzafrir Cohen
On Fri, Oct 24, 2003 at 10:47:22PM +0200, Oleg Goldshmidt wrote: > Shlomi Fish <[EMAIL PROTECTED]> writes: > > > On Fri, 24 Oct 2003, Beni Cherniavsky wrote: > > > > > Shlomi Fish wrote on 2003-10-12: > > > > > > > I want that if one of the (first) components of the pipeline exits with an > > > >

Re: Error code from a shell pipeline.

2003-10-24 Thread Oleg Goldshmidt
Shlomi Fish <[EMAIL PROTECTED]> writes: > On Fri, 24 Oct 2003, Beni Cherniavsky wrote: > > > Shlomi Fish wrote on 2003-10-12: > > > > > I want that if one of the (first) components of the pipeline exits with an > > > error code, I'll know about it somehow. How? > > > > > info bash --index PIPESTA

Re: Error code from a shell pipeline.

2003-10-24 Thread Shlomi Fish
On Fri, 24 Oct 2003, Beni Cherniavsky wrote: > Shlomi Fish wrote on 2003-10-12: > > > I want that if one of the (first) components of the pipeline exits with an > > error code, I'll know about it somehow. How? > > > info bash --index PIPESTATUS > Cool thanks. > $ true | false | true | false; ech

Re: Error code from a shell pipeline.

2003-10-24 Thread Beni Cherniavsky
Shlomi Fish wrote on 2003-10-12: > I want that if one of the (first) components of the pipeline exits with an > error code, I'll know about it somehow. How? > info bash --index PIPESTATUS $ true | false | true | false; echo [EMAIL PROTECTED] 0 1 0 1 $ { true | false | true | false; }; echo [EMAIL

Re: Error code from a shell pipeline.

2003-10-12 Thread Oded Arbel
On Sunday 12 October 2003 18:38, Shlomi Fish wrote: > (make | echo) || echo hello > > make: *** No targets specified and no makefile found. Stop. > I want that if one of the (first) components of the pipeline exits with an > error code, I'll know about it somehow. How? an erronouse exit code (a

Error code from a shell pipeline.

2003-10-12 Thread Shlomi Fish
<<< $ make || echo hello make: *** No targets specified and no makefile found. Stop. hello >>> But OTOH: <<< (make | echo) || echo hello make: *** No targets specified and no makefile found. Stop. >>> And also: <<< $ (echo | make) || echo hello make: *** No targets specified and no makefile