Subject: Re: sh problem
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
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
>does.

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
worse.  :)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."