linux怎么去重统计


当前第2页 返回上一页

1

2

3

4

5

$ sort test.txt | uniq -c | sort -rn

4 Hello World.

2 The Iphone of Apple company.

2 Apple and Nokia.

1 My name is Friendfish.

每行前面的删除重复次数。

cut命令可以按列操作文本行。可以看出前面的重复次数占8个字符,因此,可以用命令cut -c 9- 取出每行第9个及其以后的字符。

1

2

3

4

5

6

$ sort test.txt | uniq -c | sort -rn | cut -c 9-

Hello World.

The Iphone of Apple company.

Apple and Nokia.

My name is Friendfish.

I wanna buy an Apple device.

以上就是linux怎么去重统计的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

Linux如何解压压缩的文件

Linux下禁止上传目录执行php脚本

Linux性能测试之pmap命令详解

Linux下如何查看系统和进程的运行状态

Linux php 5.4安装教程

Linux下如何查看php是否启动

Linux 怎么打开文件

Linux怎么安装run文件

Linux系统如何查看系统内存与硬盘大小

什么是Linux镜像?

更多相关阅读请进入《Linux》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...