Hello,
for everyone who wanted to know how to get the return code or status from an executed command in unix:
# for example use the ls command on a directory
ls -l /home
# get return code
echo $?
This returns an integer code as 0 or 1 or 127. Normally 0 means OK, 1 means ERROR and 127 means COMMAND NOT FOUND. Every command has its own return code but the 3 mentionned before are general.