I need to remove the duplicate lines keeping their order in the file. How can I remove duplicate lines with awk?
My input.txt for awk
test bar foo foo bar bar foo foo bar
Desired output that awk should produced by removing duplicate lines whereas keeping empty lines as it is?
test bar foo bar foo foo bar