On 12/11/24 2:44 AM, Ulrich Müller wrote:
Yes, you can make the case that compound commands are pipelines, and, according to the grammar, they are, but their status is always available in $?, and they never have more than one status value.In other words, this was a design choice?
Yes.
One problem is that error-checking by testing PIPESTATUS for all-zero doesn't work after a construct like this (and similar for "case"):
If using PIPESTATUS doesn't work for your use case, use $? instead. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature