![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Grep help | flood | Shell Programming and Scripting | 3 | 06-06-2008 01:14 AM |
| Grep | Aejaz | UNIX for Advanced & Expert Users | 3 | 04-30-2008 07:10 AM |
| grep | dineshr85 | Shell Programming and Scripting | 1 | 10-10-2007 04:52 AM |
| how to exclude the GREP command from GREP | yamsin789 | UNIX for Advanced & Expert Users | 2 | 10-05-2007 02:59 AM |
| Make grep -c display like grep -n? | Jerrad | Shell Programming and Scripting | 2 | 08-25-2006 12:20 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
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??? |
|
||||
|
Add set statement and quotes around the pattern variable.
Code:
set -vx echo "Please enter the pattern below:" read pattern echo -e "Scanning t1 Logs...\n" grep -i "$pattern" /f1/log/t1.log* .... |
| Sponsored Links | ||
|
|