On Tue, Dec 10, 2024 at 05:10:08PM -0500, Chet Ramey wrote:
> On 12/10/24 4:41 AM, Mike Jonkmans wrote:
>
> > Also compare:
> > $ if false; then echo foo; fi
> > $ echo "ret = $?, status = ${PIPESTATUS[*]}"
> > ret = 0, status = 1
> > To:
> > $ if ! :; then echo foo; fi
> > $ e
On Dez 11 2024, Mike Jonkmans wrote:
> Can a command - as part of a pipeline - not be a pipeline?
! true | { ! true; }
--
Andreas Schwab, SUSE Labs, sch...@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
On Wed, Dec 11, 2024, at 3:50 AM, Mike Jonkmans wrote:
> Or worse: '! true | ! true' is a syntax error!?
> Also errors in dash, but not in ksh.
> Can a command - as part of a pipeline - not be a pipeline?
Not directly, no. (Andreas has already given a workaround.)
https://pubs.opengroup.org/onli
My opinions on this subject:
It's probably not worth changing the behavior, particularly since there
is likely to be some small amount of code out there that depends on it.
The behavior in regard to ! is correct (as has been noted) because
PIPESTATUS records the statuses of the commands in the pi
My opinions on this subject:
It's probably not worth changing the behavior, particularly since there
is likely to be some small amount of code out there that depends on it.
The behavior in regard to ! is correct (as has been noted) because
PIPESTATUS records the values of the commands in the pipe
On Wed, Dec 11, 2024 at 07:44:02PM -0500, Lawrence Velázquez wrote:
> On Wed, Dec 11, 2024, at 3:50 AM, Mike Jonkmans wrote:
> > Or worse: '! true | ! true' is a syntax error!?
> > Also errors in dash, but not in ksh.
> > Can a command - as part of a pipeline - not be a pipeline?
> Not directly, no
It would have helped greatly if you'd captured set's output as a text
file rather than sending us a screenshot of the end of the text. Just
do
$ set >set.out
Dale