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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #6 (permalink)  
Old 07-18-2008
trey85stang trey85stang is offline
Registered User
  
 

Join Date: May 2008
Posts: 70
Quote:
Originally Posted by Ikon View Post
You COULD:

until [ $status == 0 ]
do
somecommand someargs
status=$?
done

echo "Exited with status:$status"



but it would loop indefinitely if the command always failed. Would probabally want to put some limit to the number of times to retry.
Ill give this a try, Ill need to test it in my environment, this report is kind of heavy on the system so I will defiantly only need to make sure it runs 2x at the most