bug-bash
[Top][All Lists]
Advanced

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

PIPESTATUS inconsistent behavior in 3.0


From: Frank Wang
Subject: PIPESTATUS inconsistent behavior in 3.0
Date: Wed, 10 Aug 2005 06:13:34 +0100 (BST)

Configuration Information [Automatically generated, do
not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS:  -DPROGRAM='bash'
-DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu
' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/sh
are/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H 
-I.  -I. -I./include -I./lib  -
D_GNU_SOURCE -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wp,-D_FORTIFY_S
OURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables
uname output: Linux twinhead.yafrank.homeip.net
2.6.12.3-min3 #1 Sat Aug 6 21:13:43 C
ST 2005 i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 3.0
Patch Level: 16
Release Status: release

Description:
        Here is what I got from my fc4 box.
address@hidden ~]$ echo $BASH_VERSION
3.00.16(1)-release
address@hidden ~]$ ls | bogus_command | wc
      0       0       0
address@hidden ~]$ echo address@hidden
141 127 0
address@hidden ~]$ ls | tr [:lower:] [:upper:] |
bogus_command | wc
bash: bogus_command: command not found
      0       0       0
address@hidden ~]$ echo address@hidden
0 141 127 0
address@hidden ~]$ ls | bogus_command |
bogus_command2 | wc
bash: bogus_command: command not found
bash: bogus_command2: command not found
      0       0       0
address@hidden ~]$ echo address@hidden   # seems
right here
0 127 127 0

        However, in 9.1. Internal Variables, Advanced
Bash-Scripting Guide 3.5 by Men
del Cooper
(http://www.tldp.org/LDP/abs/html/abs-guide.html)
...
bash$ echo $BASH_VERSION
3.00.0(1)-release
bash$  ls | bogus_command | wc
bash: bogus_command: command not found
 0       0       0
bash$ echo address@hidden
0 127 0
        I don't have bash-3.00.0(1) in my box to test.
If abs is right, then there is
 inconsistency between the two patched version.


Repeat-By:
         Run same pipe concatenated command with bogus
command inserted in bash-3.00.
0(1) and bash-3.00.16(1) then capture the PIPESTATUS
immediately after will report di
fferent return code.


Send instant messages to your online friends http://uk.messenger.yahoo.com 




reply via email to

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