unique command - variation on the theme
I have a large file and want to keep certain lines based on the first word in each. The words are blank-delimited character strings.
The first words are not necessarily unique.
I want to keep the uniques, and that's easy enough.
Where duplicates are encountered I want to keep only one
of each, and the kept line must be the *last* of the duplicates.
Sample input file:
Desired output file:
I'm a newbie and still learning the basics, so please:
- no awk
- no bash
- no Perl
Let's stick to commands such as uniq, sort, sed, grep, cut, paste, etc.