bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] [RFC] add support for input/output count of lines


From: Roberto Nibali
Subject: Re: [PATCH] [RFC] add support for input/output count of lines
Date: Fri, 01 Oct 2004 11:54:46 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Hi Stephane,

[Long time no talk, still lurking at news:comp.unix.shell?]

When a task is too complicated for grep, one generally uses
sed or awk, you can't update grep for every single requirement
you have.

Fair enough. We somehow didn't read the gawk man page well enough to achieve the desired effect. Also I don't really see where the GNU grep authors draw the line between 'grep requirement' and 'grep feature' when I look at its man page to be honest.

gawk '/foobar/{print; n++} END{print n"/"NR > "/dev/stderr"}'

Yes, we'll try to do that and see if it works with our command chain and the speical requirement of multiple pattern (mixed AND/OR/NEGATE) matching.

[that's only my opinion, I'm not a grep developper, I also tend
to think that the "-r", "--include"... options would have best
be suited in a tree walker command as it has nothing to do with
grep's first purpose]

So as many of the options, I agree. It would be nice though to have an array of options one could specify for desired output, like it is done with the 'ps -o ...' or top commands. So if you like to have POSIX required parsing and output, it will be the standard for portability reasons, everything else has the be done using the user-specific flags.

Thank you and best regards,
Roberto Nibali, ratz
--
-------------------------------------------------------------
addr://Rathausgasse 31, CH-5001 Aarau  tel://++41 62 823 9355
http://www.terreactive.com             fax://++41 62 823 9356
-------------------------------------------------------------
terreActive AG                       Wir sichern Ihren Erfolg
-------------------------------------------------------------
Besuchen Sie uns am 29. und 30.9. an der security-zone.info
Weitere Informationen finden Sie auf www.security-zone.info
Wir freuen uns, Sie an der Messe begrüssen zu dürfen.
-------------------------------------------------------------





reply via email to

[Prev in Thread] Current Thread [Next in Thread]