Is there a way to delete duplicate lines in a file in Unix?
I can do it with sort -u and uniq commands, but I want to use sed
sort -u
uniq
sed
cat filename | sort | uniq -c | awk -F" " '$1<2 {print $2}'
Deletes the duplicate lines using awk.