Aug 5, 2007 #1 dfs1988 Programmer Joined Aug 5, 2007 Messages 4 Location US Hi, I have an file like this a13 a12 a11 a12 a11 a11 a13 I would like to have an output file like this, remove the multiple records and keep the order a13 a12 a11 Regards Mike
Hi, I have an file like this a13 a12 a11 a12 a11 a11 a13 I would like to have an output file like this, remove the multiple records and keep the order a13 a12 a11 Regards Mike
Aug 5, 2007 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR One way: Code: awk '!($1 in a){print;a[$1]}' input > output Hope This Helps, PH. FAQ219-2884 FAQ181-2886 Upvote 0 Downvote
One way: Code: awk '!($1 in a){print;a[$1]}' input > output Hope This Helps, PH. FAQ219-2884 FAQ181-2886
Aug 5, 2007 Thread starter #3 dfs1988 Programmer Joined Aug 5, 2007 Messages 4 Location US Thank you, Master! Upvote 0 Downvote