[Gllug] Bizarre shell behaviour

David Damerell damerell at chiark.greenend.org.uk
Fri Nov 7 17:33:29 UTC 2003


On Friday, 7 Nov 2003, Tethys wrote:
>Take the following shell script. Run it:
>Assuming /etc/group isn't empty (which it isn't), the script should
>echo 1, right? Well the answer is, it depends on the shell. Under
>bash, pdksh and genuine ksh, yes, it does. But under Bourne shell,
>it varies. Under AIX and OpenBSD, sure enough it echoes a 1. But
>under Solaris and Tru64, it echoes 0 instead.

Not under Solaris 2.8 here it doesn't. I can only make it do that by
using a file I don't have read permission to (but how could one not
have read permission to /etc/group ?)

-- 
David Damerell <damerell at chiark.greenend.org.uk> flcl?

-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list