Not sure how to use diff and comm for my problem
Hello,
Apologies if this question has been repeated before, but I am getting myself confused even more as I scan the posts!
I have two files, file1 is a column:
1dlwa_
1s69a_
1idra_
1ngka_
And file2 has three columns (columns seperated by tabs):
1dlw a_ A
1uvy a_ A
1dly a_ A
1uvx a_ A
1s69 a_ A
I want to only extract from file2 those rows where the first & second column concatenated together matches the first column of file1. In this example above, I would only want to see:
1dlw a_ A
1s69 a_ A
And I want to save these in a new file, file3. How would I use diff, comm, or any combination of those to do it?
Thank you in advance for your help!
InfoSeeker
|