Re: grep.... I know I am new to ubuntu but....

John Cowan <[email protected]>
Newsgroups gmane.comp.gnu.utils.bugs
Message-ID <[email protected]>
Bob Proulx scripsit:

> Of course everything you said was absolutely correct.  I hated to rain
> on it, and am trying not to, but wanted to get the information about
> "{} +" out.  Try it for 30 days and you will never go back! :-)

I'm aware of this extension to classic find syntax.  However, I still
like to use xargs because it allows pipelines to be generalized like this:

    find some/path | grep 'some.*regex' | xargs -d'\n' grep 'some-string'

which lets you select pathnames according to an arbitrary regex and then
grep exactly those files.  This allows searches which can't easily be
expressed by arguments to 'find', and is reasonably efficient provided
the subtree under some/path isn't too large.  The -d argument to xargs
forces it to treat only newlines as pathname delimiters, though if you
have filenames with newlines in their names (Ghu forbid) you'll still
have problems.

-- 
Yes, chili in the eye is bad, but so is your    John Cowan
ear.  However, I would suggest you wash your    [email protected]
hands thoroughly before going to the toilet.    http://www.ccil.org/~cowan
        --gadicath
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.