The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
to pick up the Return Code ( RC) from the mailx command and return it to SAS uisng 's manas6 UNIX for Dummies Questions & Answers 0 06-05-2008 06:44 AM
sendmail return code trichyselva Shell Programming and Scripting 0 04-02-2008 07:20 AM
Incorporte Return Code u263066 Shell Programming and Scripting 2 09-06-2006 04:58 AM
Return Code of tar in AIX dupeng AIX 3 02-23-2004 12:05 AM
return code from oracle lesstjm Shell Programming and Scripting 3 01-29-2002 03:50 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-28-2007
naamas03 naamas03 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 91
asking about return code

hi all
my system is linux red hat
i have a script that runs some object .
the object return some code to the system
i see the code by writing echo $?
i want to ask in the script if $? equals 14
how shell is do that in the script
thanks
  #2 (permalink)  
Old 08-28-2007
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,796
Quote:
Originally Posted by naamas03 View Post
i want to ask in the script if $? equals 14
how shell is do that in the script
Code:
if [[ $? -eq 14 ]] ; then
  echo "Return status is 14"
else
  echo "Return status is not 14"
fi
  #3 (permalink)  
Old 08-28-2007
arunkumar_mca arunkumar_mca is offline
Registered User
  
 

Join Date: Oct 2004
Posts: 255
Heloo...

you can do like


if [ $? -eq 14 ]
then
your tasks...
fi

Thanks,
Arun
  #4 (permalink)  
Old 08-28-2007
naamas03 naamas03 is offline
Registered User
  
 

Join Date: Sep 2005
Posts: 91
thank you very much
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:30 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0