Unix Technical Forum

Print out exitcode?

This is a discussion on Print out exitcode? within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Hi. Does anybody know how to print the exitcode of a program to the console? Regards Klaus....


Go Back   Unix Technical Forum > Unix Operating Systems > Slackware Linux Support

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-19-2008, 11:59 AM
Klaus Petersen
 
Posts: n/a
Default Print out exitcode?

Hi.

Does anybody know how to print the exitcode of a program to the console?

Regards
Klaus.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-19-2008, 11:59 AM
Oliver Haertel
 
Posts: n/a
Default Re: Print out exitcode?

On Sun, 6 Jun 2004 14:52:36 +0200
Klaus Petersen wrote:

> Hi.
>
> Does anybody know how to print the exitcode of a program to the
> console?


echo $?

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-19-2008, 11:59 AM
William Hunt
 
Posts: n/a
Default Re: Print out exitcode?

On Sun, 6 Jun 2004, Klaus Petersen wrote:
>
> Does anybody know how to print the exitcode of a program to the console?



exit $?





--
Fire the Liars - Impeach Bush and Cheney!
Prosecute the criminals - Indict Rumsfeld!
Corruption starts at the top.

William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-19-2008, 11:59 AM
William Hunt
 
Posts: n/a
Default Re: Print out exitcode?

On Sun, 6 Jun 2004, William Hunt wrote:

> On Sun, 6 Jun 2004, Klaus Petersen wrote:
> >
> > Does anybody know how to print the exitcode of a program to the console?

>
> exit $?


unwise to post until one is awake;
the correct answer is of course,

echo $?


<sheesh>






--
Fire the Liars - Impeach Bush and Cheney!
Prosecute the criminals - Indict Rumsfeld!
Corruption starts at the top.

William Hunt, Portland Oregon USA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-19-2008, 12:00 PM
Ori Bernstein
 
Posts: n/a
Default Re: Print out exitcode?

On Sun, 06 Jun 2004 14:52:36 +0200, Klaus Petersen wrote:

> Hi.
>
> Does anybody know how to print the exitcode of a program to the console?
>
> Regards
> Klaus.


programname; echo $?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:22 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com