I have 2 set of files.
File one contains ID's ex:
1111
2222
6666
3333
4444
File two contains ID and username:
1873 Neil
1111 Roger
7632 Tim
3333 Oscar
8723 Greg
4444 Roy
6666 Patrick
I want to extract the ID and username, but only the ones that has the same ID as in file 1.
I did the normal grep -f file1 file2, on two test files I made, with few Id's such as the ones i just posted. However, when i apply this to the two proper files, where file1 contains 3500 ID's and File2 contains 12000 ID's + Username, instead of extracting the 3500 lines that occur in both files, it extracts 12000 lines.
However, with the 2 test files, and a few dummy ID's it will only extract the correct ids and leave the others.
Any tip on what's wrong?
