Ok cool thanks. Found this after looking at your post
$? = The status returned by the last pipe close, backtick(``) command or system operator. Note that this is the status word returned by the wait() system call, so the exit value of the subprocess is actually ($? >>*). $? & 255 gives which signal, if any, the process died from, and whether there was a core dump.Tested it and it seems to work as expected and allows me to handle the errors.
RansomIn reply to Re^2: Running script from script
by Ransom
in thread Running script from script
by Ransom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |