promoting Perl (was Re: uutraffic report (in perl))

T. William Wells bill at twwells.com
Wed Nov 29 16:05:31 AEST 1989


In article <1989Nov28.064349.1421 at eda.com> jim at eda.com (Jim Budler) writes:
: I can't actually disagree with you, however, perl won me over with
: ONE simple example:
:
:       % find <path> <pattern> -exec < most any command> \;
: versus
:       % find <path> <pattern> -print | perl -ne 'equiv_command;'
:
: The performance improvement was HUGE!

You can also use:

      % find <path> <pattern> -print | xargs equiv_command

for many tasks.

I'm amazed at how many users are unaware of xargs. It is
amazingly useful and significantly more efficient than using
-exec. For example, when I became aware of the EASY MONEY scam
and wanted to nuke all its postings from my system, I set up a
dummy site "newarts" for batching. I now periodically execute the
script:

	cut -d' ' -f1 /home/news/spool/out.going/newarts/togo \
	    | xargs egrep EASY /dev/null \
	    | mail -s "scam" bill

and trash the illegal articles when I find them. (Actually, I use
a slightly more complex script, in order to find other
"interesting" articles which I might miss because I don't
subscribe to the appropriate group.)

---
Bill                    { uunet | novavax | ankh | sunvice } !twwells!bill
bill at twwells.com



More information about the Alt.sources.d mailing list