Date: Wed, 21 Feb 2001 18:53:26 +1300 From: Craig Carey <research@ijs.co.nz> To: current@freebsd.org Cc: Akinori MUSHA <knu@iDaemons.org> Subject: Re: find(1) -regex/-iregex Message-ID: <5.0.2.1.2.20010221184120.036e43b0@pop.qsi.net.nz> In-Reply-To: <863dd8r54c.wl@archon.local.idaemons.org> References: <3A93376D.B371FCD1@newsguy.com> <8666i588p4.wl@archon.local.idaemons.org> <3A93376D.B371FCD1@newsguy.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 that there is no regexp?. There are opinions around saying that egrep is better than grep. What is the -E option: perhaps this?: -eregex Suppose it is case sensitive. Then it could be -eiregex or -ieregex or -eregexi I hope for no regex if there is no '-iname' feature. [It would be nice if the advanced regexes settled onto the Perl regex, e.g. perhaps throughout all utilities. -pregex ] At 21-02-01 14:12 +0900 Wednesday, Akinori MUSHA 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 regexec() can be run >> inexpensively many times over. > >Indeed. I'll do it soon, thanks. > >> You forgot -E (use extended regexp syntax), and the example you show >> above is extended regexp syntax, not basic regexp syntax. > >Noted. > ... What about improving 'ls' too?: can there be an option so that it refuses to list any information about directories (useful in the above example). Also, is there any plan to stop the wastage of space in the central columns of "ls"'s output, where it lists uninteresting information. Maybe a '-p' option, like GNU 'ls' has. E-mail: Craig Carey <research@ijs.co.nz> (backup terratope@yahoo.com) Auckland, NZ. | Snooz Metasearch: http://www.ijs.co.nz/info/snooz.htm To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.0.2.1.2.20010221184120.036e43b0>