Re: PIPESTATUS differs from $? for compound command
From:
Lawrence Velázquez
Subject:
Re: PIPESTATUS differs from $? for compound command
Date:
Wed, 11 Dec 2024 19:44:02 -0500
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/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_10_02
> What bothers me (only slightly), is the documentation.
Judging by this thread, some clarification would be worthwhile.
--
vq