Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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

by Aristotle (Chancellor)
on Mar 30, 2003 at 20:23 UTC ( #246774=note: print w/replies, xml ) Need Help??

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

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.

  • Comment on Re^3: Find file that contains "....." (command in Unix)

Replies are listed 'Best First'.
Re: Re^3: Find file that contains "....." (command in Unix)
by Fletch (Chancellor) on Mar 31, 2003 at 18:52 UTC

    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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://246774]
[marto]: good morning all
[Discipulus]: good morning marto
[shmem]: good morning monkses and monksisses
[choroba]: Good morning!
[shmem]: GDPR meets butcher's shop
[marto]: if only Spectre had remained a fictional organisation :P https://www. php?page=news_item &px=Spectre-V3-V4- Vulnerabilities

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2018-05-22 07:17 GMT
Find Nodes?
    Voting Booth?