[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Is perl still the No.1 language for sysadmin?



On Mon, 3 Apr 2023 Michel Verdier wrote:
Le 3 avril 2023 Greg Wooledge a écrit :

Here's a bash version.  It's not fast, but at least it doesn't invoke
perl repeatedly.  (If you're going to invoke perl *at all* you should
simply rewrite the whole thing in perl, IMHO, or at worst have a short
sh script that pipes file's output to one perl invocation.)

[trimmed: performance data]
whole files are in cache so no io for both.
but you count links, remember /(s)bin can be now a link to /usr/(s)bin

It took me a while to fully appreciate this observation.

Calling your sweetie Honey-Bunny doesn't make you polyamorous, but
these scripts think it does.

Eg, "/honeybunny/nose" is the same hard link as "/mrsdavidson/nose",
but without subjecting the PATH elements to realpath or something like
it, this fact is ignored.

--
It is close to an axiom for me that when rich people expend
considerable sums of other people's money to persuade me something is
good for us, to disbelieve them. -- George Galloway

Reply to: