Remove duplicates

I have a file with the following format:

fields seperated by "|"

title1|something class|long...content1|keys
title2|somhing class|log...content1|kes
title1|sothing class|lon...content1|kes
title3|shing cls|log...content1|ks

I want to remove all duplicates with the same "title field"(the 1st column) regardless anything following in that line.

thanks a lot.

man sort
man uniq

awk 'F "|" '! a[$1]++' file

Thanks a lot. It works perfect.

awk -F "|" '! a[$1]++' file