Re: grep question
From: Alan Connor (xxxxxx_at_xxxx.xxx)
Date: 08/29/03
- Next message: Kevin Rodgers: "Re: Translation - Input from a variable and a file"
- Previous message: Ed Morton: "Re: grep question"
- In reply to: Kumar Sundaram: "grep question"
- Next in thread: Kevin Rodgers: "Re: grep question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Aug 2003 17:19:20 GMT
On Fri, 29 Aug 2003 11:13:27 -0500, Kumar Sundaram <ksundar@landsend.com> wrote:
>
>
> I am reading search strings for grep from a input file and using it in a
> shell script.
> How do I grep for multiple strings in the shell script.
>
> Example:
> Input file contains:
> zombie process
> BAD KEY
> FAILED_DUMP
>
> In script,
>
> for s in `cat /page/cr/file.ini`
> do
> grep "$s" "$ablog_file" |tail -n5>> "$file2
> done
>
> Thanks,
> KS
>
>
Perhaps:
while read line ; do
grep "$line" ......
done < /page/cr/file.ini
Alan C
-- take control of your mailbox ----- elrav1 ----- http://tinyurl.com/l55a
- Next message: Kevin Rodgers: "Re: Translation - Input from a variable and a file"
- Previous message: Ed Morton: "Re: grep question"
- In reply to: Kumar Sundaram: "grep question"
- Next in thread: Kevin Rodgers: "Re: grep question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|