Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Re: Find file that contains "....." (command in Unix)

by Fletch (Chancellor)
on Mar 28, 2003 at 15:46 UTC ( #246488=note: print w/ replies, xml ) Need Help??


in reply to Re: Find file that contains "....." (command in Unix)
in thread Find file that contains "....." (command in Unix)

And if you're going to depend on non-standard grep options why not just depend on using zsh and use grep '\.\.\.\.\.' ./**/*.txt to let the shell do the find for you.

(Aside: zsh rules.)


Comment on Re: Re: Find file that contains "....." (command in Unix)
Download Code
Re^3: Find file that contains "....." (command in Unix)
by Aristotle (Chancellor) on Mar 30, 2003 at 20:23 UTC
    Except that you run into trouble if you have to pass more files than will fit on a command line in your system.

    Makeshifts last the longest.

      No trouble at all, just a slightly different incantation.

      print -l ./**/*.txt | xargs grep '\.\.\.\.'

      (well, no trouble except that if your filenames may have spaces in them you'll need to use `-N' rather than `-l' and a GNUish xargs --null, but I digress . . .).

        And then we're back full circle.
        find . -name '*.txt' | xargs grep '\.\.\.\.'
        And if you have a GNUish xargs, chances are you have a GNUish grep that understands -r..

        Makeshifts last the longest.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (15)
As of 2014-07-24 15:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (161 votes), past polls