XP is just a number | |
PerlMonks |
Knob Re: Recursive Grepby knobunc (Pilgrim) |
on Jun 19, 2001 at 16:14 UTC ( [id://89615]=note: print w/replies, xml ) | Need Help?? |
That works nicely. Alternately:
If you alias that to something (e.g. superfind) you can do:
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. -ben
In Section
Cool Uses for Perl
|
|