<?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: About the script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695970#M248281</link>
    <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Give you have "X":&lt;BR /&gt;&lt;BR /&gt;# who -u|awk -v x=192.168.0.1 '$8~x {print}'&lt;BR /&gt;&lt;BR /&gt;...will print the matching entry from 'who'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Wed, 21 Dec 2005 09:23:04 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2005-12-21T09:23:04Z</dc:date>
    <item>
      <title>About the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695969#M248280</link>
      <description>I have below program to find the process "orapp" and echo the result ,&lt;BR /&gt;&lt;BR /&gt;if&lt;BR /&gt; xxxx&lt;BR /&gt;  then&lt;BR /&gt;   for x in `ps -ef |grep "orapp" |awk { print $2; }&lt;BR /&gt;&lt;BR /&gt; do&lt;BR /&gt;   echo $x&lt;BR /&gt; done&lt;BR /&gt;  else&lt;BR /&gt;   xxxx&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;now if I want to add one more condition - if the IP address of the process&lt;BR /&gt;is 192.168.0.1 ( who -u |awk  { print $8} , how can I mix these two&lt;BR /&gt;condition into one script ? thx.&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Dec 2005 09:14:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695969#M248280</guid>
      <dc:creator>sunhui</dc:creator>
      <dc:date>2005-12-21T09:14:31Z</dc:date>
    </item>
    <item>
      <title>Re: About the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695970#M248281</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;Give you have "X":&lt;BR /&gt;&lt;BR /&gt;# who -u|awk -v x=192.168.0.1 '$8~x {print}'&lt;BR /&gt;&lt;BR /&gt;...will print the matching entry from 'who'.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 21 Dec 2005 09:23:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695970#M248281</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-21T09:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: About the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695971#M248282</link>
      <description>thx james ,&lt;BR /&gt;&lt;BR /&gt;but how to mix with the above script ? thx</description>
      <pubDate>Wed, 21 Dec 2005 09:33:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695971#M248282</guid>
      <dc:creator>sunhui</dc:creator>
      <dc:date>2005-12-21T09:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: About the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695972#M248283</link>
      <description>if &lt;BR /&gt;xxxx&lt;BR /&gt;then&lt;BR /&gt;  &lt;BR /&gt; touch .mytemp&lt;BR /&gt; rm .mytemp&lt;BR /&gt; ps -ef | awk '/orapp/{print "ps", $2}' &amp;gt; .mytemp&lt;BR /&gt; who -u | awk '/192.168.0.1/ {print "who",$7}' &amp;gt;&amp;gt; .mytemp&lt;BR /&gt;awk '/^ps/ {keepid[$2]=1;next} {if (keepid[$2]==1) {print $2};}' &amp;lt; .mytem&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;xxxx&lt;BR /&gt;fi&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Dec 2005 09:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695972#M248283</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2005-12-21T09:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: About the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695973#M248284</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;I'm not sure what you want to do.  First, using 'grep' to match a process is prone to matching the wrong process.  You should use:&lt;BR /&gt;&lt;BR /&gt;# UNIX95= ps -C orapp -o pid,usr,tty&lt;BR /&gt;&lt;BR /&gt;This will find all processes whose *basename* (command) is equal to "orapp".  The output of matching processes will include the pid, the user, and the associated tty (if any).&lt;BR /&gt;&lt;BR /&gt;From that, you would match the 'tty' to the 'tty' found in the output of 'who'.  You could also match the 'pid' values.&lt;BR /&gt;&lt;BR /&gt;Does this now help?&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 21 Dec 2005 09:45:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695973#M248284</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-12-21T09:45:28Z</dc:date>
    </item>
    <item>
      <title>Re: About the script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695974#M248285</link>
      <description>thx replies,&lt;BR /&gt;&lt;BR /&gt;may be my question is not clear , I just want combine the above two condition into one script , is that possible ? thx</description>
      <pubDate>Wed, 21 Dec 2005 11:17:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-script/m-p/3695974#M248285</guid>
      <dc:creator>sunhui</dc:creator>
      <dc:date>2005-12-21T11:17:14Z</dc:date>
    </item>
  </channel>
</rss>

