<?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: command grep/find in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539432#M222940</link>
    <description>Use 'grep -l' in your command&lt;BR /&gt;&lt;BR /&gt;find . -name "*.htm" -exec grep -l domain.com {} \;&lt;BR /&gt;&lt;BR /&gt;The -l option tells grep to list the file names and not the contents of the file.&lt;BR /&gt;</description>
    <pubDate>Fri, 06 May 2005 11:16:39 GMT</pubDate>
    <dc:creator>Rick Garland</dc:creator>
    <dc:date>2005-05-06T11:16:39Z</dc:date>
    <item>
      <title>command grep/find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539430#M222938</link>
      <description>hello , I have 500 directories and need obtaing the name of file ,that it contains the word domain.com&lt;BR /&gt;I excute and obtaing ,but not the file name:&lt;BR /&gt;find . -name *.htm -exec grep domain.com  {} \;&lt;BR /&gt;&lt;BR /&gt;&lt;FORM action="domaind.com&amp;lt;FORM" action="http://domain.com&amp;lt;FORM" action="http://domain.com&amp;lt;FORM"&gt;action=&lt;A href="http://domain.com" target="_blank"&gt;http://domain.com&lt;/A&gt;&lt;/FORM&gt;</description>
      <pubDate>Fri, 06 May 2005 11:06:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539430#M222938</guid>
      <dc:creator>Jairo Campana</dc:creator>
      <dc:date>2005-05-06T11:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: command grep/find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539431#M222939</link>
      <description>Your wildcard needs to be enclosed in quotes or you will get unexpected problems if *.htm exists in your current working directory.&lt;BR /&gt;&lt;BR /&gt;find . -name '*.htm' | while read X&lt;BR /&gt;  do&lt;BR /&gt;     grep -q -i "domain.com" ${X}&lt;BR /&gt;     STAT=${?}&lt;BR /&gt;     if [[ ${STAT} -eq 0 ]]&lt;BR /&gt;       then&lt;BR /&gt;         echo "${X}"&lt;BR /&gt;       fi&lt;BR /&gt;  done&lt;BR /&gt;</description>
      <pubDate>Fri, 06 May 2005 11:15:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539431#M222939</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-05-06T11:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: command grep/find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539432#M222940</link>
      <description>Use 'grep -l' in your command&lt;BR /&gt;&lt;BR /&gt;find . -name "*.htm" -exec grep -l domain.com {} \;&lt;BR /&gt;&lt;BR /&gt;The -l option tells grep to list the file names and not the contents of the file.&lt;BR /&gt;</description>
      <pubDate>Fri, 06 May 2005 11:16:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539432#M222940</guid>
      <dc:creator>Rick Garland</dc:creator>
      <dc:date>2005-05-06T11:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: command grep/find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539433#M222941</link>
      <description>Try this way from the man page of grep.&lt;BR /&gt;find . -name *.html | xargs grep domain.com&lt;BR /&gt;&lt;BR /&gt;That should list the filename first.&lt;BR /&gt;</description>
      <pubDate>Fri, 06 May 2005 11:18:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539433#M222941</guid>
      <dc:creator>Dave Hutton</dc:creator>
      <dc:date>2005-05-06T11:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: command grep/find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539434#M222942</link>
      <description>Try;&lt;BR /&gt;&lt;BR /&gt;DOM=`find . -name *.htm`;grep "domain.com" $DOM&lt;BR /&gt;&lt;BR /&gt;it will give you the file names</description>
      <pubDate>Fri, 06 May 2005 11:19:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539434#M222942</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2005-05-06T11:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: command grep/find</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539435#M222943</link>
      <description>You can make grep print file name with every matching line, by passing /dev/null as second file. &lt;BR /&gt;&lt;BR /&gt;$ find . -name ".html" -exec grep 'domain.com' {} /dev/null \;</description>
      <pubDate>Fri, 06 May 2005 22:54:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/command-grep-find/m-p/3539435#M222943</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-05-06T22:54:16Z</dc:date>
    </item>
  </channel>
</rss>

