nl -s '|' file_with_dups | sort -k 2,8 -t '|' -u | sort -nb | cut -d '|' -f 2- > file_without_dups