I have a tab separated file that looks like this:
123 some text 123 some different text 334 some other text 341 more text
and I want to do two things. One is to order everything numerically (this is easy to do) and the other is to remove a line if it's number is already present. I.e. the output would look like this:
123 some text 334 some other text 341 more text
I tried getting a file of just the unique numbers, i.e.
123 334 341
and joining it with the original file with:
join -j 1 justNumbers.txt original.txt
but this gave me the original file back. Any ideas?