<?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: last command output in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612529#M376743</link>
    <description>Try using awk:&lt;BR /&gt;&lt;BR /&gt;last | awk '{ print $1 " " $3 " " $4 " " $5 " " $6 }'&lt;BR /&gt;&lt;BR /&gt;That should take care of question 1.  For 2, you could use grep to selectively print the user.&lt;BR /&gt;&lt;BR /&gt;For 3, you could try finger:&lt;BR /&gt;&lt;BR /&gt;for i in `cat /etc/passwd | awk -F : '{ print $1 }&lt;BR /&gt;do&lt;BR /&gt;finger $i |grep Never&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
    <pubDate>Tue, 06 Apr 2010 10:52:53 GMT</pubDate>
    <dc:creator>Pete Randall</dc:creator>
    <dc:date>2010-04-06T10:52:53Z</dc:date>
    <item>
      <title>last command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612528#M376742</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;1)I have HP-UX 11i v2, i would like to subtitute from output of "last" command to get only user name and date (day &amp;amp; time) how this possible? &lt;BR /&gt;2) As I have to check which user logged in and when exactly? &lt;BR /&gt;3) And which user is created but not logged in since long time back?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Faisal M.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2010 10:25:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612528#M376742</guid>
      <dc:creator>John Ferro</dc:creator>
      <dc:date>2010-04-06T10:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: last command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612529#M376743</link>
      <description>Try using awk:&lt;BR /&gt;&lt;BR /&gt;last | awk '{ print $1 " " $3 " " $4 " " $5 " " $6 }'&lt;BR /&gt;&lt;BR /&gt;That should take care of question 1.  For 2, you could use grep to selectively print the user.&lt;BR /&gt;&lt;BR /&gt;For 3, you could try finger:&lt;BR /&gt;&lt;BR /&gt;for i in `cat /etc/passwd | awk -F : '{ print $1 }&lt;BR /&gt;do&lt;BR /&gt;finger $i |grep Never&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Tue, 06 Apr 2010 10:52:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612529#M376743</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2010-04-06T10:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: last command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612530#M376744</link>
      <description>Mr. Pete,&lt;BR /&gt;&lt;BR /&gt;Thanks for your kind response, for Q3, finger doesn't get any output just only '&amp;gt;'&lt;BR /&gt;&lt;BR /&gt;what could be the reason...</description>
      <pubDate>Tue, 06 Apr 2010 11:10:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612530#M376744</guid>
      <dc:creator>John Ferro</dc:creator>
      <dc:date>2010-04-06T11:10:48Z</dc:date>
    </item>
    <item>
      <title>Re: last command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612531#M376745</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; Mr. Pete, Thanks for your kind response, for Q3, finger doesn't get any output just only '&amp;gt;'&lt;BR /&gt;&lt;BR /&gt;This is the shell telling you that it expects additional input before it processes your command.&lt;BR /&gt;&lt;BR /&gt;Pete simply forgot a 'done' to complete the 'do' loop.&lt;BR /&gt;&lt;BR /&gt;You could also eliminate the extra 'cat' process by doing:&lt;BR /&gt;&lt;BR /&gt;for USER in $(awk -F: '{print $1}' /etc/passwd)&lt;BR /&gt;do&lt;BR /&gt;finger ${USER}&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;</description>
      <pubDate>Tue, 06 Apr 2010 11:22:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612531#M376745</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-04-06T11:22:58Z</dc:date>
    </item>
    <item>
      <title>Re: last command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612532#M376746</link>
      <description>Dear James,&lt;BR /&gt;&lt;BR /&gt;Thanks for your kind response,&lt;BR /&gt;&lt;BR /&gt;what about for never logged in do i have to add upon what you said, |grep Never?</description>
      <pubDate>Tue, 06 Apr 2010 11:40:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612532#M376746</guid>
      <dc:creator>John Ferro</dc:creator>
      <dc:date>2010-04-06T11:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: last command output</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612533#M376747</link>
      <description>Hi (again):&lt;BR /&gt;&lt;BR /&gt;&amp;gt; what about for never logged in do i have to add upon what you said, |grep Never?&lt;BR /&gt;&lt;BR /&gt;Yes, I missed that Pete had covered that nicely :-(&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 06 Apr 2010 11:50:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/last-command-output/m-p/4612533#M376747</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2010-04-06T11:50:57Z</dc:date>
    </item>
  </channel>
</rss>

