John Oliver wrote:
I start by grepping for lines that include "project.xml", and then grep
-v lines that include a couple of other strings of characters.
Everything that's left goes through a couple of cuts to get the field I
want.  That output is sorted and run through uniq to find out how many
different elements there are, and then I use a loop with the results of
uniq to go back through the sorted list to count how many times each
element appears.

This is definitely a job for a regex engine inside a programming language. Perl will be the most succinct. Python will be readable in 6 months. Your call. ;)

You can anchor on the project.xml and chop the appropriate pieces out into variables. Use hashes for uniqueness counting.

You are almost certainly wasting way too much time rescanning and passing results between processes.

-a


--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list

Reply via email to