LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-22-2014, 12:14 PM   #1
pritammt
LQ Newbie
 
Registered: May 2014
Posts: 4

Rep: Reputation: Disabled
What is the command to display the exit status of a command ?


I can not find answer of this question. Please post helpful answer.
 
Old 05-22-2014, 12:16 PM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,475

Rep: Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424Reputation: 2424
echo $?
 
2 members found this post helpful.
Old 05-23-2014, 12:42 AM   #3
ndc85430
Member
 
Registered: Apr 2014
Distribution: Slackware
Posts: 92

Rep: Reputation: Disabled
If you're using the C shell, the variable is $status.
 
  


Reply


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
A shell command exit status. stf92 Linux - Software 5 10-29-2013 01:58 PM
Command exit status 'success' and 'failure' thomas2004ch Solaris / OpenSolaris 4 07-03-2013 05:25 PM
[SOLVED] How do I check the exit status of a remote command? Ronayn Linux - General 1 04-25-2009 05:59 AM
Exit status of system command?? rmvinodh123 Programming 4 05-04-2007 12:15 PM
Bash command exit status humbletech99 Programming 12 07-06-2006 01:20 PM


All times are GMT -5. The time now is 12:11 AM.

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