bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: $PIPESTATUS is not updated by single external commands


From: Andreas Schwab
Subject: Re: $PIPESTATUS is not updated by single external commands
Date: Sun, 17 Mar 2002 17:08:52 +0100
User-agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.2.50 (ia64-suse-linux)

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."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]