The UNIX and Linux Forums  


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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-08-2006
kdipankar kdipankar is offline
Registered User
  
 

Join Date: May 2006
Posts: 3
checking exit status of a shell script

Hi,
I have tried with the following code;

if [ ./test.ksh ];then
echo "Failure."
else
echo "Success."
fi

to test the exit status of the test.ksh shell script. But whatever is the exit status of the test.ksh shell script Failure. is always printed.

Please help.
regards,
Dipankar.