Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!eda.com!jim From: jim@eda.com (Jim Budler) Newsgroups: alt.sources.d Subject: Re: promoting Perl (was Re: uutraffic report (in perl)) Message-ID: <1989Dec1.083526.23734@eda.com> Date: 1 Dec 89 08:35:26 GMT References: <4025@mhres.mh.nl> <1194@radius.UUCP> <3273@convex.UUCP> <5261@omepd.UUCP> <1126@cirrusl.UUCP> <1989Nov28.064349.1421@eda.com> <14961@bfmny0.UU.NET> <5294@omepd.UUCP> Organization: EDA Systems,Inc. Santa Clara, CA Lines: 62 merlyn@iwarp.intel.com (Randal Schwartz) writes: } In article <14961@bfmny0.UU.NET>, tneff@bfmny0 (Tom Neff) writes: Sorry, I never saw this response. It came, and has expired. } | 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! } | } | My goodness. } | } | It's a darn good thing the above quoted poster never read the man page } | for xargs(1). I have, and have responded to other posts and mail about xargs with: 1. It's not universally available here, perl is. 2. It isn't as good on deep trees Since the example given elsewhere in the original posting was of a cleanup of a fileserver based on "find / ..." it was by definition a deep tree... } | } | He might have been won over by UNIX! :-) I was won over by UNIX long ago. } Come on. Suppose the operation was 'unlink;' or 'chmod 0644, $_;'. } The perl commandline has two total processes, where even with xargs, } you start *out* with three processes, and possibly more depending on } the number of args. And of course, either of those are superior to } the -exec solution, which is what the original poster had noticed. Exactly. } Of all people to speak, I should probably have it be known that I am } *not* a "wild-eyed fanatic" for Perl! I also am not a perl fanatic. I've merely found it more efficient in several system and network administrative tasks among different versions of UNIX. Note: xargs is not a feature of UNIX. Period. It is a PROGRAM available on several versions of Unix derived from certain late model ATT versions of UNIX, and ported to some, but certainly not all, non-ATT versions of UNIX. jim -- Jim Budler jim@eda.com ...!{decwrl,uunet}!eda!jim compuserve: 72415,1200 applelink: D4619 voice: +1 408 986-9585 fax: +1 408 748-1032 Brought to you by Super Global Mega Corp .com