help-octave
[Top][All Lists]
Advanced

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

Re: finding .m files using 'locate'


From: Joe Koski
Subject: Re: finding .m files using 'locate'
Date: Fri, 15 Jul 2005 20:42:23 -0600
User-agent: Microsoft-Entourage/11.1.0.040913



on 7/15/05 8:12 PM, Mike Miller at address@hidden wrote:

> On Fri, 15 Jul 2005, Joe Koski wrote:
> 
>> on 7/15/05 3:50 PM, Mike Miller at address@hidden wrote:
>> 
>>> locate '*.m' | perl -pe 's#(^.*)/[^/]+\.m#$1#g' | sort | uniq
>> 
>> Back in the '80s, Byte Magazine reported the annual winner of the
>> obfuscated C contest. The object was to write a C program that actually
>> did something, but nobody could decide what it was. Maybe we should have
>> and obfuscated UNIX/perl contest.
> 
> 
> Three things:
> 
> (1) you don't have to understand it to use it,
> (2) it's not that hard to read that perl regexp and
> (3) it runs 100 times faster than the "xargs dirname" code.
> 
> Mike

Mike,

I can't argue with your logic, but there are currently too many scripting
languages. On my Mac, I have Applescript, PERL, Python, SED, Tk/Tcl, make,
and plain old Unix scripts, which vary depending on the shell. Unless you
use a scripting language frequently, the syntax can be a challenge.

I mastered CDC NOS, Cray COS and VAX VMS scripts back in the 80s, and
learned that they all work. Let's hope that one language (PERL?) comes to
the front and stays there for a while.

Now if I can just find your e-mail in the archives when I need it, I can use
your knowledge. Thanks.

As is often repeated, contrary to popular belief, Unix is user friendly.
It's just very careful about who its friends are.

Joe




-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]