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 11-18-2008
Sagarddd Sagarddd is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 12
Thumbs down Script help needed

I have a code given below...

ERROR=`grep "Job Status" ${LOG_FILE}`
ERROR=${ERROR##*\(}
ERROR=${ERROR%%\)*}
if [ "${failedstart}" = 0 -a "${ERROR}" = 1 -o "${ERROR}" = 2 ]
then
echo "The job completed successfully"
EXIT_STATUS=0
else
echo "The job failed"
EXIT_STATUS=1
fi

can anybody tell me what is
ERROR=${ERROR##*\(}
ERROR=${ERROR%%\)*}

is doing...??

i dont understand the command.....## and %% what it does?