一個計算的小腳本

[root@host133 cailu]# cat urfile 
1 a
2 b
3 a
1 d
[root@host133 cailu]# awk '{a[$1]=a[$1]?a[$1]OFS$2:$2}END{for(i in a)print i,a[i]}' urfile 
1 a d
2 b
3 aide

相關文章
相關標籤/搜索