LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   whats the command that reports program success? (https://www.linuxquestions.org/questions/linux-newbie-8/whats-the-command-that-reports-program-success-462665/)

slinky2004 07-10-2006 12:31 PM

whats the command that reports program success?
 
I remember a command that would do something like output a 0 if the previous program completed successfully and a 1 if it had errors, but i can't remember anything else about it. can somebody help jog my memory?

hepburnenthorpe 07-10-2006 12:46 PM

The variable $? holds the exit status of the last command.

slinky2004 07-10-2006 01:07 PM

oh yeah. so echo $? would do it i guess.


All times are GMT -5. The time now is 05:49 AM.