<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How could I do this? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616364#M104637</link>
    <description>Hi,&lt;BR /&gt;cat&amp;gt;/tmp/string_to_search&amp;lt;</description>
    <pubDate>Fri, 02 Sep 2005 03:00:54 GMT</pubDate>
    <dc:creator>Arturo Galbiati</dc:creator>
    <dc:date>2005-09-02T03:00:54Z</dc:date>
    <item>
      <title>How could I do this?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616360#M104633</link>
      <description>I want to do a find in several directories for all files with a .cfg extension that don't contain several strings of text and return the names of those files.  I'm in the brain storming mode here and looking for ideas.  Oh yea, I'm terrible when it comes to scripting.&lt;BR /&gt;&lt;BR /&gt;example strings to search for:&lt;BR /&gt;'string 1 with spaces'&lt;BR /&gt;'string 2 with spaces'&lt;BR /&gt;'string 3 with spaces'&lt;BR /&gt;'string 4 with spaces'&lt;BR /&gt;'string 5 with spaces'&lt;BR /&gt;'string 6 with spaces'</description>
      <pubDate>Wed, 31 Aug 2005 19:57:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616360#M104633</guid>
      <dc:creator>Rob Johnson_3</dc:creator>
      <dc:date>2005-08-31T19:57:37Z</dc:date>
    </item>
    <item>
      <title>Re: How could I do this?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616361#M104634</link>
      <description>find in dirA and /foo/dirB files ending with ..cfg:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ find /dirA /foo/dirB -name '*.cfg' -print&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;now find string:  abc followed by any spaces&lt;BR /&gt;&lt;BR /&gt;$ find /dirA -name '*.cfg' -print |   \&lt;BR /&gt;    egrep 'abc * |string2 *|string3 *'&lt;BR /&gt;&lt;BR /&gt;now filter out anything I don't care for using egrep -v&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ find /dirA -name '*.cfg' -print |    \&lt;BR /&gt;    egrep 'abc * |string2 *|string3 *' \&lt;BR /&gt;    egrep -v 'aa|bb|cc'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 31 Aug 2005 20:11:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616361#M104634</guid>
      <dc:creator>D Block 2</dc:creator>
      <dc:date>2005-08-31T20:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: How could I do this?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616362#M104635</link>
      <description>Small modification:&lt;BR /&gt;&lt;BR /&gt;egrep -vl "string1|string2" `find directories -name *.cfg -type f`&lt;BR /&gt;&lt;BR /&gt;The -l option will list the filenames.</description>
      <pubDate>Thu, 01 Sep 2005 00:32:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616362#M104635</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-09-01T00:32:14Z</dc:date>
    </item>
    <item>
      <title>Re: How could I do this?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616363#M104636</link>
      <description>You can use find + xargs or find with -exec to do this easily as,&lt;BR /&gt;&lt;BR /&gt;find &lt;PATH&gt; -type f -name "*.cfg" | xargs grep -El 'string *|string1 *|string2 *'&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;find &lt;PATH&gt; -type f -name "*.cfg" -exec grep -El 'string *|string1 *|string2 *' {} \+&lt;BR /&gt;&lt;BR /&gt;hth.&lt;BR /&gt;&lt;/PATH&gt;&lt;/PATH&gt;</description>
      <pubDate>Thu, 01 Sep 2005 00:57:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616363#M104636</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-09-01T00:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How could I do this?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616364#M104637</link>
      <description>Hi,&lt;BR /&gt;cat&amp;gt;/tmp/string_to_search&amp;lt;</description>
      <pubDate>Fri, 02 Sep 2005 03:00:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616364#M104637</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2005-09-02T03:00:54Z</dc:date>
    </item>
    <item>
      <title>Re: How could I do this?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616365#M104638</link>
      <description>I like to do like this&lt;BR /&gt;find &lt;PATH&gt; -type f -name "*.cfg" | xargs grep -El 'string *|string1 *|string2 *'&lt;BR /&gt;&lt;BR /&gt;you can know more by &lt;BR /&gt;#man xargs&lt;BR /&gt;Some things like Muthukumar &lt;BR /&gt;HTH&lt;/PATH&gt;</description>
      <pubDate>Sun, 04 Sep 2005 22:18:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-could-i-do-this/m-p/3616365#M104638</guid>
      <dc:creator>Nguyen Anh Tien</dc:creator>
      <dc:date>2005-09-04T22:18:55Z</dc:date>
    </item>
  </channel>
</rss>

