LinuxQuestions.org
Visit Jeremy's Blog.
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 10-09-2013, 05:00 PM   #1
svlay
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
Exit codes


I'd like to know, is there any possible way to finish my programm with exit code more than 255, and get it by echo $?. Thanks.
 
Old 10-09-2013, 05:11 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,356

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
If you're talking about shell eg bash, its limited to 8 bits, so no.
You can however get it to print or echo out anything you want and have the caller parse that.
 
1 members found this post helpful.
Old 10-09-2013, 05:13 PM   #3
svlay
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
That's all i needed to know.
 
  


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
Zenity and exit codes Abezz Programming 2 02-03-2011 07:10 PM
What are program Exit codes, where seen? skola Linux - General 10 12-19-2009 01:15 PM
exit codes history guttersnipe Programming 1 07-07-2008 07:35 PM
'make' exit codes jhwilliams Programming 1 08-20-2007 11:22 AM
exit codes introuble Programming 2 05-08-2005 12:53 PM


All times are GMT -5. The time now is 07:28 PM.

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