[KLUG Members] getting exit code in bash script

bill billtron at billtronservices.com
Fri Mar 11 11:28:11 EST 2005


How can I get the exit code in a bash script?

I'm using 

    if [ $? -eq 0 ]
      then
      echo "Everything is O.K."
    else 

      # want to get exit code here
    fi





More information about the Members mailing list