<?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: why does this work: grep [p]md? in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780602#M832702</link>
    <description>Rather simple really. When you run ..&lt;BR /&gt;# ps -ef|grep [p]md&lt;BR /&gt;one of the process list will be ..&lt;BR /&gt;&lt;BR /&gt;root &lt;PID&gt; &lt;PPID&gt; &lt;DATE&gt; ... grep [p]md&lt;BR /&gt;&lt;BR /&gt;So running "ps -ef|grep [p]md" which specifically grep for the strings "pmd" will not return "grep pmd" string because in the process list it's "grep [p]md".&lt;BR /&gt;&lt;BR /&gt;&lt;/DATE&gt;&lt;/PPID&gt;&lt;/PID&gt;</description>
    <pubDate>Tue, 06 Aug 2002 14:21:24 GMT</pubDate>
    <dc:creator>S.K. Chan</dc:creator>
    <dc:date>2002-08-06T14:21:24Z</dc:date>
    <item>
      <title>why does this work: grep [p]md?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780600#M832700</link>
      <description>From a question a few weeks ago I learned that&lt;BR /&gt;ps -ef | grep pmd might return&lt;BR /&gt;pmd&lt;BR /&gt;ovspmd&lt;BR /&gt;and grep pmd&lt;BR /&gt;&lt;BR /&gt;but ps -ef | grep [p]md returns only&lt;BR /&gt;pmd&lt;BR /&gt;ovspmd&lt;BR /&gt;&lt;BR /&gt;For the life of me I can't figure out why this works? Please enlighten me! Thanks.&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Aug 2002 13:58:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780600#M832700</guid>
      <dc:creator>Todd Larchuk</dc:creator>
      <dc:date>2002-08-06T13:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: why does this work: grep [p]md?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780601#M832701</link>
      <description>&lt;BR /&gt;Sometimes grep will show up, other times it won't. I believe it will depend upon the speed of  "ps -ef" to the pipe. On my slower systems grep show's up.&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Tue, 06 Aug 2002 14:20:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780601#M832701</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-08-06T14:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: why does this work: grep [p]md?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780602#M832702</link>
      <description>Rather simple really. When you run ..&lt;BR /&gt;# ps -ef|grep [p]md&lt;BR /&gt;one of the process list will be ..&lt;BR /&gt;&lt;BR /&gt;root &lt;PID&gt; &lt;PPID&gt; &lt;DATE&gt; ... grep [p]md&lt;BR /&gt;&lt;BR /&gt;So running "ps -ef|grep [p]md" which specifically grep for the strings "pmd" will not return "grep pmd" string because in the process list it's "grep [p]md".&lt;BR /&gt;&lt;BR /&gt;&lt;/DATE&gt;&lt;/PPID&gt;&lt;/PID&gt;</description>
      <pubDate>Tue, 06 Aug 2002 14:21:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780602#M832702</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-08-06T14:21:24Z</dc:date>
    </item>
    <item>
      <title>Re: why does this work: grep [p]md?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780603#M832703</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;I would agree with Harry, because when I tried this in my old systems (which is slow), grep show's up the result. But some case it is not. I think it really the speed at which the grep can run at the specific time.&lt;BR /&gt;&lt;BR /&gt;hth</description>
      <pubDate>Tue, 06 Aug 2002 14:28:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780603#M832703</guid>
      <dc:creator>Sajid_1</dc:creator>
      <dc:date>2002-08-06T14:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: why does this work: grep [p]md?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780604#M832704</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;S.K. Chan is absolutely right!&lt;BR /&gt;&lt;BR /&gt;- ps -ef | grep xxx : sometimes also lists the grep command, somtimes not; as said before probably depends on speed.&lt;BR /&gt;&lt;BR /&gt;- ps -ef | grep [x]xx : cannot list the grep command itself because the command "ps -ef | grep [x]xx" will not be found by the regular expression [x]xx, as S.K. Chan mentioned.&lt;BR /&gt;&lt;BR /&gt;BTW "ps -ef | grep [x]xx" is an old trick as a short replacement for "ps -ef | grep xxx | grep -v grep"&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Thierry.</description>
      <pubDate>Tue, 06 Aug 2002 17:14:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780604#M832704</guid>
      <dc:creator>Thierry Poels_1</dc:creator>
      <dc:date>2002-08-06T17:14:52Z</dc:date>
    </item>
    <item>
      <title>Re: why does this work: grep [p]md?</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780605#M832705</link>
      <description>Check this link :&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x441436e69499d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x441436e69499d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Jean-Luc</description>
      <pubDate>Wed, 07 Aug 2002 10:54:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/why-does-this-work-grep-p-md/m-p/2780605#M832705</guid>
      <dc:creator>Jean-Luc Oudart</dc:creator>
      <dc:date>2002-08-07T10:54:38Z</dc:date>
    </item>
  </channel>
</rss>

