[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
$PIPESTATUS is not updated by single external commands
From: |
Paul Jarc |
Subject: |
$PIPESTATUS is not updated by single external commands |
Date: |
Sat, 16 Mar 2002 20:18:09 -0500 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/20.7 (i386-redhat-linux-gnu) |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H
-I/package/host/localhost/bash-2.05a/conf/readline/include
-I/package/host/localhost/bash-2.05a/conf/ncurses/include -I.
-I/package/host/localhost/bash-2.05a/conf/readline/include -I. -I./include
-I./lib -O2
uname output: Linux multivac.cwru.edu 2.4.4 #1 SMP Fri May 11 16:28:16 EDT 2001
i686 unknown
Machine Type: i686-pc-linux-gnu
Bash Version: 2.05a
Patch Level: 0
Release Status: release
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[@]}") $ '
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 $
paul
- $PIPESTATUS is not updated by single external commands,
Paul Jarc <=