![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| grep in Shell script | Krishnaramjis | Shell Programming and Scripting | 1 | 02-19-2008 05:43 PM |
| grep script | drchris | UNIX for Dummies Questions & Answers | 4 | 05-17-2007 06:32 AM |
| a script to simplify the use of grep | kemobyte | Shell Programming and Scripting | 2 | 05-01-2007 10:57 AM |
| grep from a script... | hamsasal | UNIX for Advanced & Expert Users | 1 | 08-14-2005 01:24 AM |
| script ksh/awk/grep | hoang | Shell Programming and Scripting | 2 | 06-01-2002 12:20 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I am new to this - I have a unix command (below) that I would like to make automated. I would like the script to run the below command line but would like user input for '\[11 \]' and '\[075871-A-28APR08\]' as these values will change depending on what i'm searching for. Is this possible? if so please help. grep '\[11 \]' REUTERS_200804*.log | grep '\[075871-A-28APR08\]' Thanks Darren |
| Forum Sponsor | ||
|
|
|
|||
|
hope this works for you
please add this in a script and change the permissions to chmod 755 for that file to make it executable. #!/bin/sh echo "enter the first value : \c"; read first_value echo "enter the second value : \c"; read second_value grep "\[$fist_value \]" REUTERS_200804*.log | grep "\[$second_value\]"; exit 0; |
|||
| Google UNIX.COM |