Subject: Re: sh problem
To: None <current-users@netbsd.org>
From: Erich T. Enke <eenke@wheaton.edu>
List: current-users
Date: 01/24/2000 20:24:37
I also found these results (using 1.4.1 -- I don't have access to a current
machine, but may be useful nonetheless):
sh: ! ( echo hello | grep h ); echo $?
sh: hello
sh: 1
bash: ! ( echo hello | grep h ); echo $?
bash: hello
bash: 0
ksh: ! ( echo hello | grep h ); echo $?
ksh: hello
ksh: 1
Erich
In article <E126J7P-0000PU-00@quartz.newn.cam.ac.uk>,
Patrick Welche,SCC,ext.35710, <prlw1@newn.cam.ac.uk> wrote:
>sh seems to be broken:
>
>quartz% ksh
>$ echo "$PGDATA" | grep '^/'
>/usr/local/pgsql/data
>$ echo $?
>0
>$ ! echo "$PGDATA" | grep '^/'
>/usr/local/pgsql/data
>$ echo $?
>1
>$ quartz% sh
>$ echo "$PGDATA" | grep '^/'
>/usr/local/pgsql/data
>$ echo $?
>0
>$ ! echo "$PGDATA" | grep '^/'
>/usr/local/pgsql/data
>$ echo $?
>0
>
>That last 0 should be a 1 as per ksh shouldn't it?
>
>This is NetBSD/i386-current of 4 Jan (or yesterday not sure).
>
>Cheers,
>
>Patrick