Yes, it is. However, you need a PH on the unix box to do so without jumping through a lot of hoops.
If you are using monk, you specify #t to be allowed to process return code (see Monk Manual) and provide a monk function to do something with the value that is returned.
If you use Java then the following works
int i = Runtime.getRuntime().exec(scriptCommand).waitFor();
waitFor() is the piece that gets you an integer returncode.