Re: find'ing files containing certain words (all of them) ...

2013-09-23 Thread Chris Bannister
On Sat, Sep 21, 2013 at 12:00:54PM -0400, Albretch Mueller wrote: I have come to believe this is one of those problems that is not to be optimally solved with a script, but a programming language What's the difference? OK, you give a script to the cast and a program to the audience, but other

Re: find'ing files containing certain words (all of them) ...

2013-09-23 Thread Marko Randjelovic
On Sat, 21 Sep 2013 12:00:54 -0400 Albretch Mueller lbrt...@gmail.com wrote: I have come to believe this is one of those problems that is not to be optimally solved with a script, but a programming language lbrtchx Probably AWK could be a good compromise :) words.awk: BEGIN {

find'ing files containing certain words (all of them) ...

2013-09-21 Thread Albretch Mueller
the short bash script bellow you can use to find text files containing one word, but my attempts at trying to make it find more than one word within the same file haven't been successful Of course, you can go monkey and list all files containing each word and then sort and compare those list,

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread Rob Owens
On Sat, Sep 21, 2013 at 05:22:09AM -0400, Albretch Mueller wrote: the short bash script bellow you can use to find text files containing one word, but my attempts at trying to make it find more than one word within the same file haven't been successful I think you are looking for the 'grep'

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread ken
On 09/21/2013 07:56 AM Rob Owens wrote: On Sat, Sep 21, 2013 at 05:22:09AM -0400, Albretch Mueller wrote: the short bash script bellow you can use to find text files containing one word, but my attempts at trying to make it find more than one word within the same file haven't been successful

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread Albretch Mueller
I have come to believe this is one of those problems that is not to be optimally solved with a script, but a programming language lbrtchx -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive:

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread Alexander Kapshuk
On 09/21/2013 04:46 PM, ken wrote: On 09/21/2013 07:56 AM Rob Owens wrote: On Sat, Sep 21, 2013 at 05:22:09AM -0400, Albretch Mueller wrote: the short bash script bellow you can use to find text files containing one word, but my attempts at trying to make it find more than one word within

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread recoverym4n
Hi. On Sat, 21 Sep 2013 21:12:36 +0300 Alexander Kapshuk alexander.kaps...@gmail.com wrote: I could be wrong, but doesn't egrep, which supports extended regular expressions, fit the bill? =; echo two words grep-AND-test1 =; echo two grep-AND-test2 =; echo words grep-AND-test2 =;

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread Linux-Fan
... OP wrote: You can find all files containing either import or BufferedReader, but not both words in the same file. Also, how can you use such a the same of a similar script to search for sequences of characters containing spaces and other especial characters? Say, something like:

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread Rob Owens
On Sat, Sep 21, 2013 at 09:46:34AM -0400, ken wrote: On 09/21/2013 07:56 AM Rob Owens wrote: On Sat, Sep 21, 2013 at 05:22:09AM -0400, Albretch Mueller wrote: the short bash script bellow you can use to find text files containing one word, but my attempts at trying to make it find more than

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread David
On 21 September 2013 19:22, Albretch Mueller lbrt...@gmail.com wrote: the short bash script bellow you can use to find text files containing one word, but my attempts at trying to make it find more than one word within the same file haven't been successful Your question is not at all specific

Re: find'ing files containing certain words (all of them) ...

2013-09-21 Thread David
On 22 September 2013 12:55, David bouncingc...@gmail.com wrote: if [ -n ${files[*]} ] ; then oops, that line above (#7 from the end) works ok but it will run faster if changed to this more modern bash syntax: if [[ -n ${files[*]} ]] ; then (I was writing makefiles yesterday, I got stuck