help-octave
[Top][All Lists]
Advanced

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

Re: Finding .m files on Mac with Tiger


From: Paul Kienzle
Subject: Re: Finding .m files on Mac with Tiger
Date: Fri, 15 Jul 2005 20:38:15 -0400


On Jul 15, 2005, at 7:43 PM, Mike Miller wrote:

On Fri, 15 Jul 2005, Paul Kienzle wrote:

locate is also very useful:

        locate .m

Usually you need to use it with grep:

        locate .m | grep "filt.*[.]m$"  ;# find all filt*.m files

But won't that match things like this:

/home/bob/filth/porn.m

I'm only half joking - the thing is that the '.*' in the regex could match a slash '/' and the 'filt' could be part of a directory name. I think this will do it correctly:

locate "*.m" | egrep 'filt[^/]*\.m$'


In practice I compose a variety of these on the fly so I try to keep them simple. If they return too many results, then I write in more explicit searches. For example, using Przemek's foo I will now be typing:

        locate "*.m" | grep filt

Or maybe even

        locate "*.m" | less

then in less

        /filt<CR>nnnnn


- Paul



-------------------------------------------------------------
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]