Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-10-2006, 12:31 PM   #1
Registered: Oct 2004
Posts: 309

Rep: Reputation: 30
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?
Old 07-10-2006, 12:46 PM   #2
Registered: Jun 2006
Location: Sydney
Distribution: Gentoo + Debian
Posts: 132

Rep: Reputation: 15
The variable $? holds the exit status of the last command.
Old 07-10-2006, 01:07 PM   #3
Registered: Oct 2004
Posts: 309

Original Poster
Rep: Reputation: 30
oh yeah. so echo $? would do it i guess.

Last edited by slinky2004; 07-10-2006 at 01:18 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using SSH port forwarding reports success but seems not to work. karlmdv Linux - Networking 2 02-02-2006 12:32 AM
Whats the Best Linux P2P Program Anthony1uk General 8 09-21-2005 08:41 AM
whats the first command? matthewa Linux From Scratch 4 04-04-2005 02:45 PM
Whats the best program for...? kryptobs2000 Linux - Software 10 03-01-2005 10:15 PM
command-line email success darthtux Member Success Stories 4 08-31-2003 11:57 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration