Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CHECKING A RETURN CODE IN KSH

Status
Not open for further replies.

johngiggs

Technical User
Oct 30, 2002
492
US
In the Korn shell, I want to test to see if grep returns results (RC 0). What is the command to display the return code? I know in csh it is echo $status, but I can't remember what it is in ksh.

Thanks,

John
 
$?

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Thanks, Vlad!! I totally forgot what the command was. What is $# used for?
 
$# - number of arguments [to a script for example]

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top