I have two files. I would like to print the names which are in both files.
file1
1dfg
4rte
aabd
hjgf
file2
4rte
2fgh
1dfg
desired output
1dfg
4rte
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
grepcan do that:Results:
However,
awkmay be more appropriate depending on the significance of whitespace:or: