On Mon, 7 Jul 2008 16:36:37 Gabor Szabo wrote:
>
> Given the following commands:
>
>
> $ ls -l /nosuch
> ls: /nosuch: No such file or directory
> $ echo $?
> 2
>
>
> On one Linux system I get the value 2 as above. On another Linux
> system I get the value 1.
> (The first is a relatively new Ubuntu, the other one is some old Red Hat)
>
> So am I doing something incorrectly or can I just assume that the exit
> codes can change
> even between Linuxes?
It seems a change in the `ls' program. If you check the `ls' man page
you see an added line (on a newer `ls'):
Exit status is 0 if OK, 1 if minor problems, 2 if serious trouble.
I check with various version of `ls': on versions 5.21 or below you get
exit 1, on the current version (5.97) you get exit 2.
Ehud.
--
@@@@@@ @@@ @@@@@@ @ @ Ehud Karni אהוד קרני
@ @ @ @@ @ Senior System Support תמיכה במערכות מחשב
@ @ @ @ @ @@ Mivtach - Simon מבטח - סימון
@ @ @ @ @ @ Insurance agencies סוכנויות לבטוח
Better Safe Than Sorry Tel: 03-7966-561 :טל Fax: 03-7966-667 :פקס
http://www.mvs.co.il mailto:[EMAIL PROTECTED] :דו"אל
================================================================To unsubscribe,
send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]