B
A
C
E
D
A
E
If I fire sort -u on it it's yield -
A
B
C
D
E
But what I want is -
B
A
C
E
D
Subject: How can I remove duplicates from a list
awk '!a[$0]++' yourfile
Janis
awk '!x[$0]++' FILE
--
Chris F.A. Johnson, author <http://shell.cfajohnson,com/>
===================================================================
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress)
===== My code in this post, if any, assumes the POSIX locale =====
===== and is released under the GNU General Public Licence =====