<?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: Sample Script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5708629#M638306</link>
    <description>&lt;P&gt;You can optimize this so you only have one grep:&lt;/P&gt;&lt;P&gt;ps -ex | grep -q "[s]elf test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you might want to change the echoes to something more meaningful:&lt;/P&gt;&lt;P&gt;echo "Found process: 0"&lt;/P&gt;</description>
    <pubDate>Mon, 02 Jul 2012 20:02:19 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2012-07-02T20:02:19Z</dc:date>
    <item>
      <title>Sample Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5707771#M638304</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What does the below said Scrips Explanation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ps -ex | grep -v grep | grep "self test" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&lt;/P&gt;&lt;P&gt;if [ "$?" -eq 0 ]; then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "0"&lt;BR /&gt;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; echo "1"&lt;BR /&gt;fi&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 06:12:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5707771#M638304</guid>
      <dc:creator>Ajin_1</dc:creator>
      <dc:date>2012-07-02T06:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Sample Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5707787#M638305</link>
      <description>&lt;P&gt;Are you asking what this script snippet does?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If so, it will print "0" to stdout if it finds a process in the system process table that contains the string "self test". If it doesn't find a process that contains the string "self test" it will print a "1" to stdout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 06:21:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5707787#M638305</guid>
      <dc:creator>Duncan Edmonstone</dc:creator>
      <dc:date>2012-07-02T06:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sample Script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5708629#M638306</link>
      <description>&lt;P&gt;You can optimize this so you only have one grep:&lt;/P&gt;&lt;P&gt;ps -ex | grep -q "[s]elf test"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also you might want to change the echoes to something more meaningful:&lt;/P&gt;&lt;P&gt;echo "Found process: 0"&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2012 20:02:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sample-script/m-p/5708629#M638306</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-07-02T20:02:19Z</dc:date>
    </item>
  </channel>
</rss>

