DragonFly submit List (threaded) for 2005-06
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]
Re: grep --dont-read-devices-or-symlinks
corecode wrote @ Fri, 17 Jun 2005 11:33:08 +0200:
> -----BEGIN PGP SIGNED MESSAGE-----
>
> hey.
>
> find attached a patch to grep to only read real files, ignoring symlinks,
> devices, etc.(-O --only-files). I felt I need this for grepping my /src/sys
> which also contains some compile/* directories where modules produce recursive
> loops...
Reminds me i did an alternative implementation of grep.
http://www.splashground.de/~andy/dragonfly/bgrep.c
It's not completly compliant to SUS but close enough.
I think the open options are all marked XXX.
It uses our regex lib.
The OR case is a bit slow though (foo|bar|baz).
I think that should be fixed in our regex lib.
But it's up to gnu grep in simple standard cases.
Was thinking of optimizing it a bit but ran out of time.
I also came to the conclusion that -r should be replace by find ;-)
It's not a SUSv3 option btw.
Andy
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
[
Date Index][
Thread Index]