<?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 A grep Question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882297#M849488</link>
    <description>Hi ...&lt;BR /&gt;&lt;BR /&gt;I get listener.ora file, I need to extract, only connections done by sql or sqlnav, but no include user like xx,yyy,zz,mmm,etc..&lt;BR /&gt;&lt;BR /&gt;I wrote in HP-UX v11: &lt;BR /&gt;cat listener.log | grep -v "hbeans|lsmith" &amp;gt; a1&lt;BR /&gt;or&lt;BR /&gt;cat listener.log | grep -i sjones -v 'hbeans|lsmith' &amp;gt; a1&lt;BR /&gt;&lt;BR /&gt;But, it does not work, a1 file have nothing.. I probe with single qoute and nothing too.&lt;BR /&gt;&lt;BR /&gt;Any idea...&lt;BR /&gt;Thanks...</description>
    <pubDate>Wed, 26 Jan 2005 11:58:04 GMT</pubDate>
    <dc:creator>GerGon</dc:creator>
    <dc:date>2005-01-26T11:58:04Z</dc:date>
    <item>
      <title>A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882297#M849488</link>
      <description>Hi ...&lt;BR /&gt;&lt;BR /&gt;I get listener.ora file, I need to extract, only connections done by sql or sqlnav, but no include user like xx,yyy,zz,mmm,etc..&lt;BR /&gt;&lt;BR /&gt;I wrote in HP-UX v11: &lt;BR /&gt;cat listener.log | grep -v "hbeans|lsmith" &amp;gt; a1&lt;BR /&gt;or&lt;BR /&gt;cat listener.log | grep -i sjones -v 'hbeans|lsmith' &amp;gt; a1&lt;BR /&gt;&lt;BR /&gt;But, it does not work, a1 file have nothing.. I probe with single qoute and nothing too.&lt;BR /&gt;&lt;BR /&gt;Any idea...&lt;BR /&gt;Thanks...</description>
      <pubDate>Wed, 26 Jan 2005 11:58:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882297#M849488</guid>
      <dc:creator>GerGon</dc:creator>
      <dc:date>2005-01-26T11:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882298#M849489</link>
      <description>try&lt;BR /&gt;&lt;BR /&gt;cat listener.log | grep -v hbeans | grep -v lsmith &amp;gt; a1&lt;BR /&gt;&lt;BR /&gt;Should work&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Wed, 26 Jan 2005 11:59:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882298#M849489</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-01-26T11:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882299#M849490</link>
      <description>hbeans|lsmith is an extended regular expression that grep will not support.&lt;BR /&gt;&lt;BR /&gt;use egrep&lt;BR /&gt;&lt;BR /&gt;cat listener.log | egrep -i "hbeans|lsmith" &amp;gt;&amp;gt; a1</description>
      <pubDate>Wed, 26 Jan 2005 12:02:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882299#M849490</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2005-01-26T12:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882300#M849491</link>
      <description>To use Extended Regular expressions with grep, you need to use -E/-e options.</description>
      <pubDate>Wed, 26 Jan 2005 12:04:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882300#M849491</guid>
      <dc:creator>Sundar_7</dc:creator>
      <dc:date>2005-01-26T12:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882301#M849492</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;and it would work faster without cat, e.g.:&lt;BR /&gt;# grep -Eiv "hbean|smith|jones" listener.log &amp;gt;a1&lt;BR /&gt; &lt;BR /&gt;regards,&lt;BR /&gt;John K.</description>
      <pubDate>Wed, 26 Jan 2005 12:18:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882301#M849492</guid>
      <dc:creator>john korterman</dc:creator>
      <dc:date>2005-01-26T12:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882302#M849493</link>
      <description>You can also use multiple -e arguments with -v, so this works as well:&lt;BR /&gt;&lt;BR /&gt;cat listener.log | grep -v -e "hbeans" -e "lsmith" &amp;gt; a1&lt;BR /&gt;&lt;BR /&gt;And, BTW, not exactly related to your question, but interesting and useful nonetheless...&lt;BR /&gt;&lt;BR /&gt;It is a rather classic misuse or inefficiency to start pipelines with cat in this way. grep takes an input file argument. So something like this for exmple:&lt;BR /&gt;&lt;BR /&gt;cat listener.log | grep -v -e "hbeans" -e "lsmith" &amp;gt; a1&lt;BR /&gt;&lt;BR /&gt;is better written as this:&lt;BR /&gt;&lt;BR /&gt;grep -v -e "hbeans" -e "lsmith"  listener.log &amp;gt; a1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jan 2005 12:21:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882302#M849493</guid>
      <dc:creator>John Kittel</dc:creator>
      <dc:date>2005-01-26T12:21:22Z</dc:date>
    </item>
    <item>
      <title>Re: A grep Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882303#M849494</link>
      <description>Thanks a lot to all..</description>
      <pubDate>Wed, 26 Jan 2005 15:32:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/a-grep-question/m-p/4882303#M849494</guid>
      <dc:creator>GerGon</dc:creator>
      <dc:date>2005-01-26T15:32:22Z</dc:date>
    </item>
  </channel>
</rss>

