Re: find(1) -regex/-iregex

2001-02-22 Thread Alfred Perlstein
* Daniel C. Sobral [EMAIL PROTECTED] [010220 19:39] wrote: Alfred Perlstein wrote: * Akinori MUSHA [EMAIL PROTECTED] [010220 11:19] wrote: Hi, I have implemented -regex and -iregex options for find(1): Sounds good, just make sure the regex engine matches the one that the

Re: find(1) -regex/-iregex

2001-02-20 Thread Alfred Perlstein
* Akinori MUSHA [EMAIL PROTECTED] [010220 11:19] wrote: Hi, I have implemented -regex and -iregex options for find(1): Sounds good, just make sure the regex engine matches the one that the other find(1)'s use. -- -Alfred Perlstein - [[EMAIL PROTECTED]|[EMAIL PROTECTED]] "I have the heart

Re: find(1) -regex/-iregex

2001-02-20 Thread Akinori MUSHA
At Wed, 21 Feb 2001 08:42:19 +1300, Craig Carey wrote: What about the -iname option?. I recently installed GNU 'find' just to get that -iname problem fixed. Can you do -iname too?. Thanks for the info. It's added now. I'm ashamed to say that I couldn't resist implementing -E option to

find(1) -regex/-iregex

2001-02-20 Thread Akinori MUSHA
Hi, I have implemented -regex and -iregex options for find(1): http://people.FreeBSD.org/~knu/misc/find_regex.diff They are meant to be compatible with those of GNU's and NetBSD's: -regex pattern: True if the whole path of the file matches pattern using basic regular

Re: find(1) -regex/-iregex

2001-02-20 Thread Daniel C. Sobral
Akinori MUSHA wrote: Hi, I have implemented -regex and -iregex options for find(1): http://people.FreeBSD.org/~knu/misc/find_regex.diff I'm not familiar with find sources, but it seems to me you execute regcomp() for each file name to be compared? If so... change that! :-) Regcomp()

Re: find(1) -regex/-iregex

2001-02-20 Thread Daniel C. Sobral
Alfred Perlstein wrote: * Akinori MUSHA [EMAIL PROTECTED] [010220 11:19] wrote: Hi, I have implemented -regex and -iregex options for find(1): Sounds good, just make sure the regex engine matches the one that the other find(1)'s use. It won't. GNU find certainly uses GNU regexp

Re: find(1) -regex/-iregex

2001-02-20 Thread Daniel C. Sobral
Akinori MUSHA wrote: I would object if it is a new variant of regexp. I'd say it ought be between egrep and perl, in its functionality. ... - Perl's regexp is known to be a unique variant that is different from the "basic regexp" nor the "extended regexp" ;P For that matter, anyone

Re: find(1) -regex/-iregex

2001-02-20 Thread Akinori MUSHA
At Wed, 21 Feb 2001 12:35:09 +0900, Daniel C. Sobral wrote: I'm not familiar with find sources, but it seems to me you execute regcomp() for each file name to be compared? If so... change that! :-) Regcomp() does expensive setup so that regexec() can be run inexpensively many times over.

Re: find(1) -regex/-iregex

2001-02-20 Thread Akinori MUSHA
At Wed, 21 Feb 2001 14:12:51 +0900, I wrote: At Wed, 21 Feb 2001 12:35:09 +0900, Daniel C. Sobral wrote: I'm not familiar with find sources, but it seems to me you execute regcomp() for each file name to be compared? If so... change that! :-) Regcomp() does expensive setup so that

Re: find(1) -regex/-iregex

2001-02-20 Thread Craig Carey
Can an -iname option be provided. Then the FreeBSD find would be more like GNU find, and lines like this could be written: find /msdos-disk -iname "*txt" | xargs -n 1 ls -l I am doubtful that the -regexp needs to be inferior to the the -egrep option. What software would break: it was said

Re: find(1) -regex/-iregex

2001-02-20 Thread Daniel C. Sobral
Akinori MUSHA wrote: I'm not familiar with find sources, but it seems to me you execute regcomp() for each file name to be compared? If so... change that! :-) Regcomp() does expensive setup so that regexec() can be run inexpensively many times over. Indeed. I'll do it soon,

Re: find(1) -regex/-iregex

2001-02-20 Thread Akinori MUSHA
At Wed, 21 Feb 2001 18:53:26 +1300, Craig Carey wrote: Can an -iname option be provided. Then the FreeBSD find would be more like GNU find, and lines like this could be written: Yes, it's already implemented as I wrote in the previous mail. I am doubtful that the -regexp needs to be

Re: find(1) -regex/-iregex

2001-02-20 Thread Akinori MUSHA
At Wed, 21 Feb 2001 15:06:22 +0900, Daniel C. Sobral wrote: http://people.FreeBSD.org/~knu/misc/find_regex.diff You might have done it, but the version above is not it. :-) Oh, would you please reload it? When you see a function named do_c_regex(), that's it. :) --