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

Jim Budler jim at eda.com
Fri Dec 1 19:35:26 AEST 1989


merlyn at iwarp.intel.com (Randal Schwartz) writes:

} In article <14961 at bfmny0.UU.NET>, tneff at bfmny0 (Tom Neff) writes:

Sorry, I never saw this response. It came, and has expired.

} | 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!
} | 
} | 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 at eda.com    ...!{decwrl,uunet}!eda!jim
compuserve: 72415,1200     applelink: D4619
voice: +1 408 986-9585     fax: +1 408 748-1032



More information about the Alt.sources.d mailing list