awk '!a[$1]++' 对于$1是第一次出现的行进行打印,也就是去除$1重复的行 http://bbs.chinaunix.net/forum.php?mod=viewthread&tid=1672726#pid11904888