- 论坛徽章:
- 15
|
回复 14# o0o520
有输出结果啊。- awk '{str=$1;gsub(/_[^_]*$/,"",str)}NR==FNR{a[str FS $2]++;next} a[str FS $2]<5 ' infile infile
- abc_11.EventClick_201310 ae6aadd913c8a4d6e409e7921b19fc84 -
- abc_11.EventClick_201312 d24327fef393ea33e662d362c96926bc -
- abc_11.Rev_201306 23fe872bcadc7549a71eedc7151bd7d5 -
- abc_11.Rev_201307 23fe872bcadc7549a71eedc7151bd7d5 -
- abc_11.K_W_201101 b6c1ba230fe87d13ed2f291698d008fd -
- abc_11.K_W_201102 b6c1ba230fe87d13ed2f291698d008fd -
- abc_11.K_W_201103 b6c1ba230fe87d13ed2f291698d008fd -
复制代码 看看你的awk 是不是gawk. |
|