replacement of 'sort | uniq'

2014-04-11 19:20:09 +08:00
 duzhe0
https://github.com/duzhe/nsuniq
2839 次点击
所在节点    Linux
5 条回复
rrfeng
2014-04-12 12:15:07 +08:00
sort -u
duzhe0
2014-04-12 13:27:01 +08:00
@rrfeng
sort 不支持uniq的-c参数,而且它是排序的,如果我们只需要uniq,在数据量大时性能无法忍受
rrfeng
2014-04-12 13:54:42 +08:00
@duzhe0
awk 都是一句话的事
duzhe0
2014-04-12 14:01:02 +08:00
@rrfeng
就是用awk实现的
rrfeng
2014-04-12 14:07:50 +08:00
@duzhe0
对啊,所以我觉得没必要……

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/108181

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX