Command grep -

Suvayu Ali fatkasuvayu+linux at gmail.com
Fri Apr 12 17:26:34 UTC 2013


On Fri, Apr 12, 2013 at 07:04:43PM +0200, Reindl Harald wrote:
> 
> 
> Am 12.04.2013 18:31, schrieb Bob Goodwin - Zuni:
> > 
> > If I do "less syslog.txt | grep DST=17." I get a mixture of outputs containing "17."
> 
> escaping and quotes are your friend
> less syslog.txt | grep "DST=17\."

Isn't it redundant to use less before the pipe, why not use grep
directly?

  $ grep "DST=17\." syslog.txt

If the OP expects a long output, he can do

  $ grep "DST=17\." syslog.txt | less

-- 
Suvayu

Open source is the future. It sets us free.


More information about the users mailing list