<?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: Is it possible to grep two or more patterns ? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041295#M134414</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can use grep -e&lt;BR /&gt;&lt;BR /&gt;# cat /etc/passwd | grep -e root -e daemon -e adm&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.</description>
    <pubDate>Tue, 05 Aug 2003 07:57:10 GMT</pubDate>
    <dc:creator>Robert-Jan Goossens</dc:creator>
    <dc:date>2003-08-05T07:57:10Z</dc:date>
    <item>
      <title>Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041294#M134413</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Is it possible to grep two or more patterns ?&lt;BR /&gt;&lt;BR /&gt;eg: I want to grep root, daemon and adm in password file.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance,&lt;BR /&gt;YC</description>
      <pubDate>Tue, 05 Aug 2003 07:53:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041294#M134413</guid>
      <dc:creator>yc_2</dc:creator>
      <dc:date>2003-08-05T07:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041295#M134414</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;You can use grep -e&lt;BR /&gt;&lt;BR /&gt;# cat /etc/passwd | grep -e root -e daemon -e adm&lt;BR /&gt;&lt;BR /&gt;Robert-Jan.</description>
      <pubDate>Tue, 05 Aug 2003 07:57:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041295#M134414</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2003-08-05T07:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041296#M134415</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Yes,  Try :&lt;BR /&gt;&lt;BR /&gt;# grep -e root -e adm -e daemon /etc/passwd&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers!</description>
      <pubDate>Tue, 05 Aug 2003 07:57:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041296#M134415</guid>
      <dc:creator>Tim Adamson_1</dc:creator>
      <dc:date>2003-08-05T07:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041297#M134416</link>
      <description>$ cat /etc/passwd | grep root | grep daemon | grep adm</description>
      <pubDate>Tue, 05 Aug 2003 08:00:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041297#M134416</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2003-08-05T08:00:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041298#M134417</link>
      <description>Yes, you can grep two or more patterns in one go&lt;BR /&gt;&lt;BR /&gt;1 - grep -e &lt;PAT1&gt; -e &lt;PAT2&gt; ... &lt;FILE1&gt; &lt;FILE2&gt; ...&lt;BR /&gt;&lt;BR /&gt;2 - egrep "&lt;PAT1&gt;|&lt;PAT2&gt;|&lt;PAT3&gt;|..." &lt;FILE1&gt; &lt;FILE2&gt; ....&lt;BR /&gt;&lt;BR /&gt;I prefer method 2 as it is less typing&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Tim&lt;/FILE2&gt;&lt;/FILE1&gt;&lt;/PAT3&gt;&lt;/PAT2&gt;&lt;/PAT1&gt;&lt;/FILE2&gt;&lt;/FILE1&gt;&lt;/PAT2&gt;&lt;/PAT1&gt;</description>
      <pubDate>Tue, 05 Aug 2003 08:03:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041298#M134417</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2003-08-05T08:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041299#M134418</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;U can use egrep , which is extended grep .&lt;BR /&gt;&lt;BR /&gt;syntax is&lt;BR /&gt;&lt;BR /&gt;cat passswd |egrep -i 'root|daemon|adm'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regds,&lt;BR /&gt;baiju</description>
      <pubDate>Tue, 05 Aug 2003 09:29:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041299#M134418</guid>
      <dc:creator>blal</dc:creator>
      <dc:date>2003-08-05T09:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041300#M134419</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;egrep is the best way. you can refer man page for more options.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;VJ.</description>
      <pubDate>Wed, 06 Aug 2003 06:37:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041300#M134419</guid>
      <dc:creator>vasundhara</dc:creator>
      <dc:date>2003-08-06T06:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to grep two or more patterns ?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041301#M134420</link>
      <description># grep -E 'root|daemon|adm' /etc/passwd</description>
      <pubDate>Wed, 06 Aug 2003 06:41:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/is-it-possible-to-grep-two-or-more-patterns/m-p/3041301#M134420</guid>
      <dc:creator>twang</dc:creator>
      <dc:date>2003-08-06T06:41:47Z</dc:date>
    </item>
  </channel>
</rss>

