how to display exit status?

If none of the more specific forums is the right place to ask

how to display exit status?

Postby ilias » 2005-09-01 16:14

i am running a command. Namely

the manual page of the command says that if the exit status is 0(true) the acpi subsystem is available.
if the exit status is 1 (false) the acpi subsystem is not available.

I know there is a command - or an environment variable - but I can't remember which one.

Posts: 11
Joined: 2005-08-31 22:12

Postby dawgie » 2005-09-02 00:05

The exit status is many times used as a condition to start (or not start) another command.

$command1 && command2
If command1 exits with no error, then command2 starts. So you could do this:
ilias#acpi_available && echo 'success'
There is also the bash characters to display the exit status
So after you
Then check the exit status:
ilias#echo $?

Information in the Debian Reference Manual 13.2.3 ... am.en.html
User avatar
Posts: 431
Joined: 2004-06-16 21:30
Location: New Hampshire USA

Postby ilias » 2005-09-02 08:42

That's cool
Thanks dawgie
Posts: 11
Joined: 2005-08-31 22:12

Return to General Questions

Who is online

Users browsing this forum: No registered users and 5 guests