editing gnuplot initialization file

Ryan Schmidt ryandesign at macports.org
Wed Mar 31 21:21:23 PDT 2010


On Mar 31, 2010, at 23:12, Scott Haneda wrote:

>>> If you know the name of the file you are looking for, a `sudo find /opt/local -name "the-filename-pattern"` where "the-filename-pattern" can be a regular expression, so to find all ini files, it would be "*.ini" or just look for the exact filename "gnuplot.ini" ( `sudo find /opt/local -name "gnuplot.ini"` )
>> 
>> Actually, "find" takes a glob pattern; regular expression syntax is different from glob syntax.
> 
> Well, that is just plain weird, I never knew that.  I have always fed it regular expressions, the only thing that I ever really picked up on being different was the case insensitive aspect, which I liked.  I was pretty sure there would be a way to over-ride the case-i aspects anyway.
> 
> But I have fed it the usual ^abc and other basic expressions, and they always seemed to work.  I guess since dealing with file names is rather simple, I never thought they were glob patterns.
> 
> Then again, just today, I should have looked into it, as as basic OR regex was not working, and I had to pile up a bunch of -name commands.
> 
> Thanks for pointing that out, I wonder how many files I have passed to xargs, or not passed to xargs, thinking I was using a full blown parser. 

"^abc" isn't a valid glob and shouldn't work (and doesn't):


$ cd $(port dir zlib)
$ find . -name ^P
$ find . -name P
$ find . -name P*
./Portfile


"find" is case-sensitive with the -name option and case-insensitive with the -iname option.


$ find . -name Portfile
./Portfile
$ find . -name portfile
$ find . -iname portfile
./Portfile




More information about the macports-users mailing list