[Top][All Lists]
[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:30:25 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 |
Hi,
thank you for your patch, and thank you for sharing the idea with us.
But the same can be achieved by awk, eg.
gawk '
/foobar/ {c++; print}
END {
printf("input_lines=%d\noutput_lines=%d\n", NR,c) >"/dev/stderr"
}'
ITYM s#}'#}'</var/log/really_big_file# but yes, you're correct.
The only gawk-specific feature is the redirection to "/dev/stderr".
You can use a temporary file, to get portable solution.
We only need portability on Linux and Solaris, which should be safe with your
proposal.
But yes, awk uses a bit different syntax of regular expressions then
either grep or egrep.
This we have to investigate and this was also the main reason why sometimes we
were a bit hesitant to use grep. Also the command chain looks a bit more
difficult than the given example. I will check back with the responsible
developers to see if your solution is viable for our purposes.
So my first impression is not to include your patch.
I wouldn't probably either if I was the GNU grep maintainer ;).
But I'd also like to hear opinions from other people on the list.
(Perhaps off the list, I'll publish a summary.)
Thanks.
BTW: Even if the feature were accepted, I'd hesitate to grant the
one-letter options, but that's not relevant at the moment.
I know it's fugly but definitely not relevant.
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.
-------------------------------------------------------------