Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Knob Re: Recursive Grep

by knobunc (Pilgrim)
on Jun 19, 2001 at 16:14 UTC ( #89615=note: print w/replies, xml ) Need Help??

in reply to Recursive Grep

That works nicely. Alternately:

find . -type f | grep -v CVS | xargs egrep

If you alias that to something (e.g. superfind) you can do:

superfind -i whatever

Of course the intermediate grep can be eliminated if you don't have standard things to ignore. Also you can replace the egrep with your favorite grep-like substitute. By having the egrep bare at the end you can pass whatever flags you want to it.

The advantage of the above is that it is probably faster, and I can remember & type it quickly when moving from machine to machine. The downside is that I don't have all of Perl's regex language (but egrep usually has all I need for this), it will not work on non-Unix boxes without additional packages, and that I can't customize it more as needed to control the exact matches. However, xargs is a cool and often overlooked tool.


Replies are listed 'Best First'.
Re: Knob Re: Recursive Grep
by John M. Dlugosz (Monsignor) on Jun 19, 2001 at 19:37 UTC
    There is a grep written in Perl, tcgrep, that supports all of Perl's regex by nature.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://89615]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2018-03-24 13:02 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (298 votes). Check out past polls.