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解压tar文件命令是什么

Linux系统中的源是什么意思

Linux如何安全配置mysql数据库

Linux 挂载 fat32 和 ntfs格式u盘实例教程

Linux中什么是文件

如何快速简单的优化快照使用成本

Linux shell 脚本分享

Linux中硬链接和软链接的区别

Linux优点是什么?

使用getinstancescreenshot获取实例的截屏信息

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



打赏

取消

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

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

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

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

评论

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