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




Thread: grep help
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 02-06-2007
roshanjain2 roshanjain2 is offline
Registered User
  
 

Join Date: Dec 2006
Posts: 16
grep help

echo "Please enter the pattern below:"
read pattern
echo -e "Scanning t1 Logs...\n"
grep -i $pattern /f1/log/t1.log*
echo -e "Scanning t2 Logs...\n"
grep -i $pattern /f1/log/t2.log*
echo -e "Scanning t3 Logs...\n"
grep -i $pattern /fmxprtmmk1/log/t3.log*
echo -e "Search Complete\n"

When i execute this script... it does the first grep and stops...it doesnt continue executing the script....what could be the problem???