Subject: Re: sh problem
To: Patrick Welche <email@example.com>
From: Andrew Brown <firstname.lastname@example.org>
Date: 01/25/2000 10:22:44
>> that's easy! it's just like a shell script.
>OK, one more time. sh doesn't return the logical negative of the second
>command in a pipeline when the pipeline is preceeded by '!'. This is not
>"expected behaviour" as some said, it isn't a question of fixing some
>script or other that I am writing. sh just doesn't do what it says it
oh, that's right. sorry. well, at least now we can make some numbers
easily. just jam a "! " in front of those four lines in that script.
sh bash ksh zsh csh tcsh
!(cmd1;cmd2) 0 2 0 0
!cmd1;cmd2 2 2 2 2 bad bad
!(cmd1|cmd2) 0 2 0 0 syntax syntax
!cmd1|cmd2 2 0 0 0
sh, csh, and ksh are from a stock 1.3.3 system
bash is version 2.03 from source
tcsh is version 6.09 from source
zsh is 3.0.5 from the package system
so, yeah, it looks like sh is wrong. of course, bash looks even
|-----< "CODE WARRIOR" >-----|
email@example.com * "ah! i see you have the internet
firstname.lastname@example.org (Andrew Brown) that goes *ping*!"
email@example.com * "information is power -- share the wealth."