http://man.linuxde.net/awk
1.为一列id加逗号
awk 'BEGIN {ORS=","}{print $1}' test.txt
2.统计一列id中重复的id
awk '{a[$1]++} END{for(i in a){if(a[i]>1){print i}}}' test.txt
http://man.linuxde.net/awk
1.为一列id加逗号
awk 'BEGIN {ORS=","}{print $1}' test.txt
2.统计一列id中重复的id
awk '{a[$1]++} END{for(i in a){if(a[i]>1){print i}}}' test.txt