Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: Private Utilities

by Eimi Metamorphoumai (Deacon)
on Dec 01, 2005 at 00:59 UTC ( #513162=note: print w/replies, xml ) Need Help??

in reply to Re: Private Utilities
in thread Private Utilities

I can see some uses for your quotemeta for pipes, but the use you mentioned is more easily written as
find -name \*.pl -print0 | xargs -0 grep foo
which has the advantage of quoting all nasty filename characters (for instance, new lines, tabs, etc).

Replies are listed 'Best First'.
Re^3: Private Utilities
by thor (Priest) on Dec 01, 2005 at 04:47 UTC
    Except that not all finds and xargss have this feature. The ones included with Solaris, for example.


    The only easy day was yesterday

Re^3: Private Utilities
by belg4mit (Prior) on Dec 01, 2005 at 01:08 UTC
    If you have newlines in your filenames you've issues IMHO. As for "more easily" well, I don't find your idiom particularly intuitive (it relies upon two arcane swtiches and you're sort of repeating yourself). Besides, I don't use the tool as much as I could because it always slips my mind, the more I use it the more I'll use it :-P

    It's interesting to know there's an option, maybe I'll include some variant as the default when I get around to writing the trivial wrapper that accepts arguments in the right order. POSIX be damned, find is grep-ing the filesystem and it ought to be find EXPR PATH

    In Bob We Trust, All Others Bring Data.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://513162]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (7)
As of 2020-10-19 23:26 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (207 votes). Check out past polls.