- 论坛徽章:
- 0
|
输入文件- ##name count note
- aa 2 abc 123
- bb 3 bcd 234
复制代码 输出文件(除“count”列被摒弃,其余列均不做改变)- ##name note
- aa abc 123
- aa abc 123
- bb bcd 234
- bb bcd 234
- bb bcd 234
复制代码 自己在用$ more file sort|uniq -c 统计记录重复次数想,如果反过来处理,是否可以通过count值还原重复的记录呢?- $ uniq --h
- Usage: uniq [OPTION]... [INPUT [OUTPUT]]
- Discard all but one of successive identical lines from INPUT (or
- standard input), writing to OUTPUT (or standard output).
- Mandatory arguments to long options are mandatory for short options too.
- -c, --count prefix lines by the number of occurrences
复制代码 |
|