The return value is the exit status of the program as returned by the "wait" call. To get the actual exit value, shift right by eight
And farther down:
printf "child exited with value %d\n", $? >> 8;
Is there any way the documentation could be clearer about it?
In reply to Re: "system" returns different exit code than running the command from the command line
by moritz
in thread "system" returns different exit code than running the command from the command line
by greenmoss
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |