Hi guys, I need your help.
I have two files:
file1
1
3
5
file2
1,XX
2,AA
3,BB
4,CC
5,DD
I would like to compare the first column and where they are equal to write that output in a new file:
1,XX
3,BB
5,DD
It is supposed that all numbers from file1 should be presented in file2.
And is it possible, just in case if the number is not available in file2, to write only the number from file1 and leave second column empty or fill it with N/A
E.g.