GeekInterview.com
Home
Tech Articles
Code Samples
Learn
Freelance Projects
Online Testing
Geek Talk
Job Postings
Knowledge Base
Geek Blogs
Question Bank
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
I am new,
Sign me up!
User Name
Remember Me?
Password
Interview Questions
Certification
Placement Papers
Tech FAQ
Career Advice
Engineering
Ask Question
GeekInterview.com
>
Interview Questions
>
Operating System
>
Shell Scripting
Go To First
|
Previous Question
|
Next Question
Shell Scripting
| Question 6 of 47
Print
What does $? return?
Total Answers and Comments:
5
Last Update: March 30, 2007
Sponsored Links
Best Rated Answer
—
No best answer available. Please pick the good answer available or
submit
your answer.
June 02, 2005 07:28:14
#1
Muthu
RE: What does $? return?
Will return the status of the command which is executed lastly.
0 > Success
2 > Error
Is this answer useful?
Yes
|
No
January 25, 2006 15:14:41
#2
sumit01_77
Member Since: December 2005 Contribution: 27
RE: What does $? return?
just to add above0 for success and any number other than 0 is for failure Ashish
Is this answer useful?
Yes
|
No
February 27, 2006 00:12:53
#3
RE: What does $? return?
$? will return exit status of command .0 if command gets successfully executed non-zero if command failed.
Is this answer useful?
Yes
|
No
March 28, 2007 07:39:57
#4
Rajeesh
RE: What does $? return?
it will return the exit status of the last command that executed.. 0 means last command was a success and 1 or any other no means it was a failure.thats it...
Is this answer useful?
Yes
|
No
March 30, 2007 17:57:57
#5
Chiranjeevi Manne
RE: What does $? return?
It returns the exit status of the previously executed command.
if it is '0' then success otherwise fail.
Is this answer useful?
Yes
|
No
Go To Top
Sponsored Links
Related Categories
—
Shell Scripting Interview Questions
Solaris Admin Interview Questions
UNIX Interview Questions
Unix Interview Questions
Unix Programming Interview Questions
Operating System Interview Questions
Sponsored Links
About Us
-
Privacy Policy
-
Terms and Conditions
-
Contact
-
Ask Question
-
Propose Category
-
Site Updates
Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved