[EMAIL PROTECTED] wrote:
> Hi,
> 
> I have two username/password files from two different systems.  I
> need the script to output users that exist in both files to
> >>match.txt  users that do not match, output to >>no_match.txt
> 
> Users1.txt: (tab delimited)
> 
> Abc   123
> Scsadffa      adjeka*
> Etc...
> 
> 
> Users2.txt: (tab delimited)
> 
> Abc   123
> 23daas        kjiaoa
> Etc...
> 
> Match.txt should contain:
> 
> Abc   123     Abc     123
> 
> 
> * first set is from users1.txt and second set is from users2.txt
> 
> No_match should contain:
> 
> Scsadffa      adjeka*
> 23daas        kjiaoa
> 
> 
> Should be easy, but I can't get it work.... In short, does someone
> have a script already written?

        what have you tried? You should be able to use a hash with user as a 
key and then output those that have two hits to match and those not equal to 2 
to no_match.  if you want to know which system they are on, then need to carry 
either an extra field or on file 1 you add 1 for each hit and for file 2 you 
add 2.  So anyone not equal to 3 is a non match.  If 1 then from file 1 or from 
file 2 if equal to 2.  A thought.

Wags ;)

> 
> Thanks in advance.
> 
> 
> _______________________________________________
> ActivePerl mailing list
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



*******************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
*******************************************************


_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to