strict grep when patterns are presented on standard input
From: Ariel Burbaickij (ariel.burbaickij_at_gmail.com)
Date: 07/28/04
- Next message: Fazl: "Re: copy a directory recursively without data/files"
- Previous message: Alexander: "send telnet escape character in script"
- Next in thread: Dana French: "Re: strict grep when patterns are presented on standard input"
- Reply: Dana French: "Re: strict grep when patterns are presented on standard input"
- Reply: Ariel Burbaickij: "Re: strict grep when patterns are presented on standard input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 28 Jul 2004 05:07:51 -0700
Hello dear newsgroup participants,
I have following problem:
I would like to greo for some let us say IP addresses
in /etc/hosts file. Grep is used in the pipe of commands
and it is not known ahead of time what IP addresses will
be presented to grep, so grep is used with -f - option.
In the file entries of both 192.168.111.11 and 192.168.111.112
are presented,only 192.168.111.11 is presented to the grep on
standard input but both are presented on the standard output
because they both contain the same string. Now my question:
Can strict option/quotes etc. be applied to the grep when it becomes
its arguments from standard input in the pipe (i.e. as standard output from
other command)? Clear, I can add just another sed command to the pipe
that will prepend and append quote sign but I so far it would be interesting
to understand whether it goes directly with grep or not
With Best Regards
Ariel Burbaickij
- Next message: Fazl: "Re: copy a directory recursively without data/files"
- Previous message: Alexander: "send telnet escape character in script"
- Next in thread: Dana French: "Re: strict grep when patterns are presented on standard input"
- Reply: Dana French: "Re: strict grep when patterns are presented on standard input"
- Reply: Ariel Burbaickij: "Re: strict grep when patterns are presented on standard input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|