<?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: Test Processing in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258218#M332579</link>
    <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;cat passwd | awk -F: '{print $1}'&lt;BR /&gt;&lt;BR /&gt;Use this command to make lists.&lt;BR /&gt;&lt;BR /&gt;diff the files and use sort -u to come up with a single, valid master user list.&lt;BR /&gt;&lt;BR /&gt;Then combine the files. Probably best to cat them into one file and delete the dups.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
    <pubDate>Tue, 26 Aug 2008 20:08:49 GMT</pubDate>
    <dc:creator>Steven E. Protter</dc:creator>
    <dc:date>2008-08-26T20:08:49Z</dc:date>
    <item>
      <title>Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258217#M332578</link>
      <description>I have 3 passwd files. Some of the users exist in 3 files (they are from 3 different servers) and some of them only exist in only one file.&lt;BR /&gt;&lt;BR /&gt;I want to make a single file taking users entries from 3 files combine into a single file. For users who exist in all the 3 servers, I want to list their 3 uids infront of their user names. Can some one give me some direction how to do that?</description>
      <pubDate>Tue, 26 Aug 2008 19:02:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258217#M332578</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2008-08-26T19:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258218#M332579</link>
      <description>Shalom,&lt;BR /&gt;&lt;BR /&gt;cat passwd | awk -F: '{print $1}'&lt;BR /&gt;&lt;BR /&gt;Use this command to make lists.&lt;BR /&gt;&lt;BR /&gt;diff the files and use sort -u to come up with a single, valid master user list.&lt;BR /&gt;&lt;BR /&gt;Then combine the files. Probably best to cat them into one file and delete the dups.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 26 Aug 2008 20:08:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258218#M332579</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2008-08-26T20:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258219#M332580</link>
      <description>Hi Razi,&lt;BR /&gt;&lt;BR /&gt;U can use the below command for 3 passwd file. then take the output of each file into same xl sheet then sort it by name. After that u can make one file .But before doing any activity like replacing the file first take the backup of that file.&lt;BR /&gt;&lt;BR /&gt;the command is&lt;BR /&gt;cat /etc/passwd | awk -F: '{print $1 ,$3}'&lt;BR /&gt;&lt;BR /&gt;Best Luck&lt;BR /&gt;Atul</description>
      <pubDate>Wed, 27 Aug 2008 04:00:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258219#M332580</guid>
      <dc:creator>Prashanth Waugh</dc:creator>
      <dc:date>2008-08-27T04:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258220#M332581</link>
      <description>Is it what you want:&lt;BR /&gt;&lt;BR /&gt;awk -F: '{print $3, $1}' firstfile secfile thirdfile |sort -k2 &amp;gt; userlist</description>
      <pubDate>Wed, 27 Aug 2008 08:33:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258220#M332581</guid>
      <dc:creator>Rasheed Tamton</dc:creator>
      <dc:date>2008-08-27T08:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258221#M332582</link>
      <description>Let me give you more detail:&lt;BR /&gt;&lt;BR /&gt;Lets say I have a user called steve on three servers having different uids like 108, 120, 139 on three different servers but same username steve on all of them, and on the other hand, lets say I have another user kami on just one server having uid 159, I want my resulting file to look like that.&lt;BR /&gt;&lt;BR /&gt;steve 108 120 130&lt;BR /&gt;kami  159&lt;BR /&gt;&lt;BR /&gt;Can some one help me in this?</description>
      <pubDate>Wed, 27 Aug 2008 12:31:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258221#M332582</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2008-08-27T12:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258222#M332583</link>
      <description>&lt;!--!*#--&gt;Hi Wager:&lt;BR /&gt;&lt;BR /&gt;# cat .allusers&lt;BR /&gt;#!/usr/bin/perl&lt;BR /&gt;use strict;&lt;BR /&gt;use warnings;&lt;BR /&gt;my ( %users, $name, $uid );&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;    my ( $name, $uid ) = ( split /:/ )[ 0, 2 ];&lt;BR /&gt;    push( @{ $users{$name} }, $uid );&lt;BR /&gt;}&lt;BR /&gt;for $name ( sort keys %users ) {&lt;BR /&gt;    print "$name: @{$users{$name}}\n";&lt;BR /&gt;}&lt;BR /&gt;1;&lt;BR /&gt;&lt;BR /&gt;...run, passing any number of files as arguments, like:&lt;BR /&gt;&lt;BR /&gt;# ./allusers /etc/passwd /etc/passwd.server2 /etc/passwd.server3&lt;BR /&gt;&lt;BR /&gt;...output looks like:&lt;BR /&gt;&lt;BR /&gt;ablebody: 300&lt;BR /&gt;somebody: 333&lt;BR /&gt;wagar: 111 1221&lt;BR /&gt;zebra: 101 102 101 &lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Wed, 27 Aug 2008 12:47:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258222#M332583</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2008-08-27T12:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258223#M332584</link>
      <description>A basic way.  I am sure there is something more elegant.  Might just give you some ideas.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;awk -F: '{print $1 " " $3}' passwd1|while read username uid&lt;BR /&gt;do&lt;BR /&gt;echo "File1: $uid $username"&lt;BR /&gt;echo "File2: \c"&lt;BR /&gt;awk -F: '$1 ~ "$username" {print $1 " " $3}' passwd2&lt;BR /&gt;echo "File3: \c"&lt;BR /&gt;awk -F: '$1 ~ "$username" {print $1 " " $3}' passwd3&lt;BR /&gt;done</description>
      <pubDate>Wed, 27 Aug 2008 12:52:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258223#M332584</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-08-27T12:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258224#M332585</link>
      <description>&lt;!--!*#--&gt;Try this:&lt;BR /&gt;sort passwd1 passwd2 passwd3 | awk -F: '&lt;BR /&gt;BEGIN { getline; name = $1; uid = $3 }&lt;BR /&gt;{&lt;BR /&gt;if ($1 == name) {&lt;BR /&gt;   uid = uid " " $3 # concat&lt;BR /&gt;} else {&lt;BR /&gt;   print name, uid  # print last&lt;BR /&gt;   name = $1; uid = $3&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;END { print name, uid } '</description>
      <pubDate>Thu, 28 Aug 2008 09:29:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258224#M332585</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-08-28T09:29:24Z</dc:date>
    </item>
    <item>
      <title>Re: Test Processing</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258225#M332586</link>
      <description>Lst script is working fine, thank you very much guys for your help and support.&lt;BR /&gt;&lt;BR /&gt;I need one more help, Lets say if I wanna add when that particular user logs in last time, how can I add that to this script.&lt;BR /&gt;&lt;BR /&gt;Lets say if I have a user steve and he logged in for the last time one week before, output should be like that:&lt;BR /&gt;&lt;BR /&gt;Steve uid1 uid2 uid3 19-AUG-08</description>
      <pubDate>Thu, 28 Aug 2008 11:38:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-processing/m-p/4258225#M332586</guid>
      <dc:creator>Waqar Razi</dc:creator>
      <dc:date>2008-08-28T11:38:04Z</dc:date>
    </item>
  </channel>
</rss>

