I have a .txt
file, listing some user names.
Like:
User1
User2
User3
I also have a .txt
file, containing some of the same user names, along side other information:
User1 - user1@txt.com - 12341515 - yes
User2 - user2@txt.com - 13134141 - no
How do I search from the first file, the users in the second file, then output the complete row of the second file in a new txt file.
I tried, Get-content
and |where-object
, but I don't know how to search exactly.
The files do not have a header.
Update
The file1, where are the user that i want to find is like this
u16096
The original file2, where all the user info are have this order.
u16096 Y NAME SURNAME name.surname@what.com 12345678