Subject: forward: [tulloh@dev.tivoli.com: Re: forwarded [chet@odin.INS.CWRU.Edu: Re: /bin/sh bug or not?]]
To: None <current-users@NetBSD.ORG>
From: Kenneth Stailey <kstailey@leidecker.gsfc.nasa.gov>
List: current-users
Date: 05/12/1995 19:21:21
Date: Thu, 11 May 1995 22:27:16 -0500
From: tulloh@dev.tivoli.com (Robert Tulloh)
To: kstailey@leidecker.gsfc.nasa.gov
Subject: Re: forwarded [chet@odin.INS.CWRU.Edu: Re: /bin/sh bug or not?]
Cc: chet@odin.INS.CWRU.Edu
Content-Length: 2191
> Which version of bash? And which version of sh?
You asked about version information of shells I tested with...
$ echo $0
-ksh
$ uname -a
SunOS corp.tivoli.com 5.4 generic sun4d sparc
$ i=`false`
$ echo $?
1
$ bash
bash$ echo $BASH_VERSION
1.14.0(1)
bash$ i=`false`
bash$ echo $?
255
bash$ exit
exit
$ sh
$ echo $0
sh
$ i=`false`
$ echo $?
255
This was all run on the same Sun box. My personal workstation is a
PowerPC based RS/6000 running AIX 3.2.5. I can run the same tests there...
tulloh@jessup: echo $0
-ksh
/tivoli/k4/4/tulloh
tulloh@jessup: uname -a
AIX jessup 2 3 000333194600
/tivoli/k4/4/tulloh
tulloh@jessup: i=`false`
/tivoli/k4/4/tulloh
tulloh@jessup: echo $?
1
/tivoli/k4/4/tulloh
tulloh@jessup: bash
/tivoli/k4/4/tulloh
tulloh@jessup: echo $BASH_VERSION
1.14.0(1)
/tivoli/k4/4/tulloh
tulloh@jessup: i=`false`
/tivoli/k4/4/tulloh
tulloh@jessup: echo $?
1
tulloh@jessup: exit
exit
/tivoli/k4/4/tulloh
tulloh@jessup: sh
$ echo $0
sh
$ i=`false`
$ echo $?
1
$ exit
At home, I have <gulp> Linux running and it's bash behaves the same way...
(my NetBSD machine is upstairs, honest! Its an Amiga running NetBSD 0.9...)
tulloh:~$ echo $0
-bash
tulloh:~$ echo $BASH_VERSION
1.14.2(1)
tulloh:~$ i=`false`
tulloh:~$ echo $?
1
tulloh:~$ uname -a
Linux tulloh 1.1.59 #2 Sun Jan 15 15:11:31 CST 1995 i586
That is all the version info I can generate quickly - if it helps. I
can also run this on DG, HP, NCR, AT&T, UnixWare and a few more if
this is helpful. You see, Tivoli is in the business of heterogenous
systems management :-)
So, does this sound like a real problem? I couldn't tell from the
follow up if someone really thought this needed to be fixed. I am
open to suggested ways to fix it. Seems kind of tricky though since
the result is generated in a fairly generic way via recursion. Maybe
there is a good way to fix it, but I don't see it yet.
Rob
Rob Tulloh | TIVOLI Systems, Inc. | Phone: (512) 794-9070
| 9442 Capital of Tx Hwy, North | FAX : (512) 794-0623
| Arboretum Plaza One Suite 500 | DID #: (512) 502-4662
tulloh@tivoli.com | Austin, TX 78759, USA |