Date: Wed, 1 Sep 2021 19:04:12 +0100 From: Harald van Dijk <a...@gigawatt.nl> Message-ID: <837d3b5b-ac61-98eb-2741-d667a78e2...@gigawatt.nl>
| Is there any statement that overrides the general definition to | explicitly make this unspecified? If not, the general definition applies | and $? must expand to 0 both times it appears on line 2. Perhaps as currently written that's correct, but if so, the standard probably needs to be updated, as it is fairly clear that shells which set $? as each command substitution finishes have always existed (in fact, that might have been what the original Bourne shell did, I haven't checked) and the standard should allow for that. kre