I have a tab-delimited text file that is very large. Some lines have the same value in the file, some lines just have unique value, For example:
a foo
a bar
a foo2
b bar2
c bar2
c foo3
d bar3
...
I also have another ID list file, which is just part of the whole list. For example:
a
b
d
...
I want to get the correspond value for those ID list, the ID list is unique. How can I do it using perl script or python or basic bash command? Appreciate it!
In perl: