Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Zsh reporting bad return status of commands



zefram@xxxxxxxxxxxxxxxxx writes:
 > Clint Olsen wrote:
 > >Interesting.  Then it must be broken on SunOS since it is also set there
 > >but it doesn't print out the bad exit status.
 > ...
 > >pdxgp1 ~# ls /foo
 > >/foo not found
 > 
 > No, it's just that the native ls on SunOS (and Solaris) returns an exit
 > code of 0 under these circumstances.  A bug in ls?  It wouldn't be the
 > first one.

It's just the BSD variant of ls that returns 0:

kanto% uname -a
SunOS kanto 5.4 Generic_101945-41 sun4m sparc
kanto% /usr/bin/ls /foo; echo $?
/foo: No such file or directory
2
kanto% /usr/ucb/ls /foo; echo $? 
/foo not found
0



Messages sorted by: Reverse Date, Date, Thread, Author