In Unix, one is often asked to find out the exit status of previous command i.e whether it was executed successfully or not.
In order to find out, type the foll. in terminal :
echo $?
If the output is 0 then it means the previous command got executed successfully.
If the previous command failed then the output of echo $? would be 127.
In order to find out, type the foll. in terminal :
echo $?
If the output is 0 then it means the previous command got executed successfully.
If the previous command failed then the output of echo $? would be 127.
No comments:
Post a Comment