[Linux-Anyway] Re: FreeBSD resolv.conf followup and a script toclean ports

  • From: Horror Vacui <horrorvacui@xxxxxxx>
  • To: Linux-Anyway@xxxxxxxxxxxxx
  • Date: Fri, 30 Apr 2004 20:36:17 +0200

On Fri, 30 Apr 2004 20:04:59 +0200
Godwin wrote:

> On Fri, 30 Apr 2004 13:58:15 -0400, Scott Robbins <scottro@xxxxxxxxxx>
> wrote:
> 
> > I wonder which is faster, shell or perl. As they're both
> > interpreted, probably the same, but either way, it's a thing to do
> > when you're away for awhile.
> 
> Most of the execution time is waiting for the filesystem. I doubt
> there's a significant difference between doing it in shell and in
> perl.

If the scripts did roughly the same, they'd probably take the same time
to run, but the one I wrote accesses the filesystem far more (goes
through everything under /usr/ports and runs tests on every one of
them). The good ol' bash script by Scott just generates a list of
directories through wildcards, descends only two levels of directories,
and runs a test on one subdir per list item. I lose. I'm now onto
something else, but I'll probably tune my script to mimic the bash
script behaviour and therefore use the right approach and tools. I'm the
best example for the fact that a powerful language in the hands of an
inexperienced user often does more harm then good - with bash I'd have
been forced to come up with something similarly simple and
straightforward as Scott's script. With perl I no sooner got hold of a
powerful module than I started shooting cannons at mosquitoes. Good
lesson, at any rate.

Cheers

-- 
Horror Vacui

Registered Linux user #257714

Go get yourself... counted: http://counter.li.org/
- and keep following the GNU.
To unsubcribe send e-mail with the word unsubscribe in the body to:   
Linux-Anyway-Request@xxxxxxxxxxxxx?body=unsubscribe

Other related posts: