How do I get a shell script to remove duplicates in a text file, based on the 11th 21st columns?
Sample file:
Header:0000000000000001457854500000
XP 12345678912yeyeyeyeeye 0000003
XP 12345678913yeyeyeyeeye 0000002
XP 12345678912yeyeyeyeeye 0000004
XP 12345678913yeyeyeyeeye 0000001
Footer:0000000000000001245856500004
Expected output:
Header:0000000000000001457854500000
XP 12345678913yeyeyeyeeye 0000001
Xp 12345678912yeyeyeyeeye 0000004
Footer:0000000000000001245856500001
Footer,Headerstrings? By looking at the number of fields?