compare a string in two files
- by Tarun
I am trying to get the name of the user from one file and their corresponding details from my other file.
I use the command
awk -F : '{ print $1 }' user-name
it gives me the list of all the user's. So now how can I match these names with the other file and get a output like:
user-name id contact-details
The format of the two files is like follows:
1.user-name
Tarun:143
Rahul:148
Neeraj:149
2.user-details
Tarun:[email protected]
Neeraj:[email protected]
Rahul:[email protected]
what I'm trying to get is like:
Neeraj:149:[email protected]
Rahul:148:[email protected]
Tarun:143:[email protected]