Return codes and pipelines

2003-01-12 Thread Rolf Campbell
/home/rcampbell (true | true) echo true || echo false true /home/rcampbell (true | false) echo true || echo false false /home/rcampbell (false | true) echo true || echo false true /home/rcampbell (false | false) echo true || echo false false The third test above yields different results

Re: Return codes and pipelines

2003-01-12 Thread Randall R Schulz
Rolf, One posting is enough, really. There is no guaranteed or specified parent child relationship between the processes in a pipeline. This means that you cannot predict which process's status will be the one returned as that of the pipeline as a whole. You can force this in your contrived

Re: Return codes and pipelines

2003-01-12 Thread Jon LaBadie
On Sun, Jan 12, 2003 at 02:21:45PM -0800, Randall R Schulz wrote: Rolf, One posting is enough, really. There is no guaranteed or specified parent child relationship between the processes in a pipeline. This means that you cannot predict which process's status will be the one returned as

Re: Return codes and pipelines

2003-01-12 Thread Randall R Schulz
Jon, Well, Cygwin does not include Bourne shell, it has BASH, ash and zsh, but it does appear that the status returned by a parenthesized pipeline under BASH is that of the last command in that pipeline. Strictly speaking, that's not at odds with the first part of what I said, which is that

Re: Return codes and pipelines

2003-01-12 Thread Jon LaBadie
On Sun, Jan 12, 2003 at 09:22:55PM -0800, Randall R Schulz wrote: Jon, Well, Cygwin does not include Bourne shell, it has BASH, ash and zsh, but it does appear that the status returned by a parenthesized pipeline under BASH is that of the last command in that pipeline. As specified on