<?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 shell script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453797#M209158</link>
    <description>And the perl entry is...&lt;BR /&gt;&lt;BR /&gt;who -u | perl -ane 'if (m/testuser/) {print "$F[6]\n"}' | head -1&lt;BR /&gt;&lt;BR /&gt;I'm sure perl has a internal "head" type function but I'm not 100% sure!!&lt;BR /&gt;&lt;BR /&gt;Tim</description>
    <pubDate>Mon, 03 Jan 2005 09:06:09 GMT</pubDate>
    <dc:creator>Tim D Fulford</dc:creator>
    <dc:date>2005-01-03T09:06:09Z</dc:date>
    <item>
      <title>About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453788#M209149</link>
      <description>In the shell , &lt;BR /&gt;#who -u |grep testuser &lt;BR /&gt;testuser    pts/17       Jan  1 13:55 00:50         16525 (168.0.7.1)&lt;BR /&gt;testuser    pts/16       Jan  1 09:25 00:15         20834 (198.0.7.2)&lt;BR /&gt;&lt;BR /&gt;#who -u |grep testuser |awk '{ print $7 }&lt;BR /&gt;16525&lt;BR /&gt;20834&lt;BR /&gt;&lt;BR /&gt;If I only want to get the result of "16525" ( get the line 1 only ) , what can I do ?  thx</description>
      <pubDate>Mon, 03 Jan 2005 01:48:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453788#M209149</guid>
      <dc:creator>peterchu</dc:creator>
      <dc:date>2005-01-03T01:48:33Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453789#M209150</link>
      <description>#who -u |grep testuser |awk '{ print $7 } | xargs echo | awk '{print $1}'&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jan 2005 02:14:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453789#M209150</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-01-03T02:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453790#M209151</link>
      <description>#who -u |grep testuser |awk '{ print $7 }|head -1&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Trond</description>
      <pubDate>Mon, 03 Jan 2005 02:16:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453790#M209151</guid>
      <dc:creator>Trond Haugen</dc:creator>
      <dc:date>2005-01-03T02:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453791#M209152</link>
      <description>peterchu,&lt;BR /&gt;Trond's reply is probably more efficient than my previous reply.&lt;BR /&gt;&lt;BR /&gt;Another way to do this is:&lt;BR /&gt;&lt;BR /&gt;#who -u |grep testuser |awk '{ print $7 } | read -r a; echo $a&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jan 2005 02:29:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453791#M209152</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-01-03T02:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453792#M209153</link>
      <description>...and, ofcourse..&lt;BR /&gt;#who -u |grep testuser | read -r a b c d e f g h;echo $g&lt;BR /&gt;&lt;BR /&gt;:-)&lt;BR /&gt;&lt;BR /&gt;- Biswajit&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jan 2005 02:33:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453792#M209153</guid>
      <dc:creator>Biswajit Tripathy</dc:creator>
      <dc:date>2005-01-03T02:33:41Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453793#M209154</link>
      <description>and even better:&lt;BR /&gt;who -u | awk '/testuser/ {print $7}' | head -1&lt;BR /&gt;&lt;BR /&gt;Best Regards!</description>
      <pubDate>Mon, 03 Jan 2005 03:59:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453793#M209154</guid>
      <dc:creator>Jannik</dc:creator>
      <dc:date>2005-01-03T03:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453794#M209155</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;who -u|grep ^testuser|awk '{print $7}'|head -1&lt;BR /&gt;&lt;BR /&gt;BR.</description>
      <pubDate>Mon, 03 Jan 2005 04:34:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453794#M209155</guid>
      <dc:creator>Jose Mosquera</dc:creator>
      <dc:date>2005-01-03T04:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453795#M209156</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;who -u |grep testuser |awk '{print $7;exit}'&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Mon, 03 Jan 2005 04:54:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453795#M209156</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2005-01-03T04:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453796#M209157</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Perhaps the most correct solution if you want to use awk&lt;BR /&gt;&lt;BR /&gt;who -u |grep testuser |awk 'BEGIN {getline; print $7 }'&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Jan 2005 05:15:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453796#M209157</guid>
      <dc:creator>Leif Halvarsson_2</dc:creator>
      <dc:date>2005-01-03T05:15:39Z</dc:date>
    </item>
    <item>
      <title>Re: About the shell script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453797#M209158</link>
      <description>And the perl entry is...&lt;BR /&gt;&lt;BR /&gt;who -u | perl -ane 'if (m/testuser/) {print "$F[6]\n"}' | head -1&lt;BR /&gt;&lt;BR /&gt;I'm sure perl has a internal "head" type function but I'm not 100% sure!!&lt;BR /&gt;&lt;BR /&gt;Tim</description>
      <pubDate>Mon, 03 Jan 2005 09:06:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/about-the-shell-script/m-p/3453797#M209158</guid>
      <dc:creator>Tim D Fulford</dc:creator>
      <dc:date>2005-01-03T09:06:09Z</dc:date>
    </item>
  </channel>
</rss>

