Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!novavax!twwells!bill From: bill@twwells.com (T. William Wells) Newsgroups: alt.sources.d Subject: Re: promoting Perl (was Re: uutraffic report (in perl)) Message-ID: <1989Nov29.050531.233@twwells.com> Date: 29 Nov 89 05:05:31 GMT References: <4025@mhres.mh.nl> <1194@radius.UUCP> <3273@convex.UUCP> <5261@omepd.UUCP> <1126@cirrusl.UUCP> <1989Nov28.064349.1421@eda.com> Organization: None, Ft. Lauderdale, FL Lines: 35 In article <1989Nov28.064349.1421@eda.com> jim@eda.com (Jim Budler) writes: : I can't actually disagree with you, however, perl won me over with : ONE simple example: : : % find -exec < most any command> \; : versus : % find -print | perl -ne 'equiv_command;' : : The performance improvement was HUGE! You can also use: % find -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@twwells.com Brought to you by Super Global Mega Corp .com