[ale] find or locate text

Fletch fletch at phydeaux.org
Wed Oct 9 13:35:11 EDT 2002


>>>>> "Michael" == Michael D Hirsch <mhirsch at nubridges.com> writes:


[...]

    >> That'll start up a grep for each file.  More efficient to use
    >> xargs instead which will break the arguments up into batches.
    >> That find invocation will also look at things such as
    >> directories and device files as well as plain vanilla files;
    >> better to limit with `-type f' rather than `-name \*'.
    >> 
    >> find . -type f -print0 | xargs --null grep fooble

    Michael> Why not use recusive grep: grep -r fooble *

        Because that'd depend on having a GNU grep (not like -print0
and xargs --null aren't GNUisms already, and this is a Linux list
anyhow . . . :), and I actually frequently use Tom Christiansen's
grep-in-perl[1] that does spiffy things like hilighting matched text in
the output and looking at things by paragraph rather than just line by
line.


        Then again TMTOWTDI (even if some of them don't involve perl).


[1] -- http://www.perl.com/language/ppt/src/grep/tcgrep

-- 
Fletch                | "If you find my answers frightening,       __`'/|
fletch at phydeaux.org   |  Vincent, you should cease askin'          \ o.O'
770 294-0820 (m)      |  scary questions." -- Jules                =(___)=
                      |                                               U

---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list