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 -->
  #4 (permalink)  
Old 11-22-2007
mvictorvijayan mvictorvijayan is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 29
script

#!/bin/ksh

grep "the requested operation was successfully completed" $1 >/dev/null
RESULT =`echo $?`
if [ $RESULT == 0 ]; then
echo "Continue"
else
echo "Stop"
fi

Assume this script file name is sample.sh. If your log file name is logfile, then in the command prompt give like this

$sample.sh logfile