January 30th, 2003, 09:59 AM
Is it possible to get a negative exit value on a shell script ?
My_prog.exe return (-1).
The echo gives me 255. why ?
Is i a way to get -1 or any other negative value, other than
RESULT_EXIT=`expr 254 - $?`
January 30th, 2003, 04:47 PM
you have .com and .exe files on unix? a very old version of SCO UNIX when it still belonged to Microsoft?
afaik unix programs return an int, i.e. usually a signed 32 bit value.
if your shell only supports unsigned bytes (0-255), i consider this a bug in your shell. as your unix seems to be quite old (10-20yrs?), imho you should really not deal with it at all anymore. although i never tested this behaviour on recent unices..