RSS Forums RSS
Please support our Shell Scripting advertiser: Programming Forums

new to shell scripting, need some help

Join Date: Apr 2006
Location: India
Posts: 16
Reputation: kamitsin is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
kamitsin kamitsin is offline Offline
Newbie Poster

Re: new to shell scripting, need some help

  #2  
Apr 27th, 2006
$? is variable in which the exit status of the last command is stored.

0 - Sucessful execution of command
1 - Error

The importance of this variable in shell scripting is that

"In a shell script, the error message is ignored and the script continues to execute. For this reason, it is necessary to check whether a program exited successfully."

Hope this helps.

Amit
Reply With Quote  
All times are GMT -4. The time now is 9:27 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC