http://betterthangrep.com/I'm on Solaris with only POSIX grep by default, this think is waay better, **smoking** fast, and works just fine with iw-perl. Check it out, you won't be disappointed./t
I'm on Solaris with only POSIX grep by default
In what context do you make this statement?Are you doing benchmarks of Perl code that both calls out to the POSIX grep and uses the built-in grep - in order to get a sense of overall performace - or are you just impresses with grep functionality that you didn't know existed?
find . -name "*.xml" -exec fgrep -l "mysearchtext" {} \;
ack --xml "mysearchtext"
No, i'm just using it from the command line for now (i just found this thing), but, to search for text in my DCRs, i tried this:find . -name "*.xml" -exec fgrep -l "mysearchtext" {} \; vs this:ack --xml "mysearchtext" and the second one if four times faster (approx. 5500 DCRs in the category i'm looking through). As for the functionality thing, i'm used to gnu grep at home (linux) but at work i'm stuck with POSIX grep, and i keep missing all those extra goodies like context, only matching, etc.., which this thing has. I haven't looked into integrating this into any scripts ... yet/t
Depending on what grep you have, there is a recursive option, though as Bo pointed out, a perl copy of grep is still faster than native.