prj@po.cwru.edu (Paul Jarc) writes:
|> A single-element pipeline containing an external command does not
|> update PIPESTATUS. Problems like this might be easier to detect if $?
|> were reimplemented as just an alias for ${PIPESTATUS[$#PIPESTATUS]}.
|> They are intended to always have the same value, aren't they?
|>
|> bash-2.05a$ PS1='$(echo "${PIPESTATUS[@]}") $ '
Useless Use of Command Substitution:
PS1='${PIPESTATUS[@]} $ '
|> 0 $ false | false
|> 1 1 $ ls | cat > /dev/null
|> 0 0 $ /bin/false
|> 0 0 $ false | false
|> 1 1 $ ls > /dev/null
|> 1 1 $ true
|> 0 $
I cannot reproduce that with the same version on ia64-suse-linux.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."