Tuesday, May 10, 2011

shell script test exit code

some_nix_command
if [ "$?" -eq "0" ]; then
   # do something
fi

No comments:

Post a Comment