V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
duzhe0
V2EX  ›  Linux

replacement of 'sort | uniq'

  •  
  •   duzhe0 · Apr 11, 2014 · 3473 views
    This topic created in 4405 days ago, the information mentioned may be changed or developed.
    5 replies    1970-01-01 08:00:00 +08:00
    rrfeng
        1
    rrfeng  
       Apr 12, 2014
    sort -u
    duzhe0
        2
    duzhe0  
    OP
       Apr 12, 2014
    @rrfeng
    sort 不支持uniq的-c参数,而且它是排序的,如果我们只需要uniq,在数据量大时性能无法忍受
    rrfeng
        3
    rrfeng  
       Apr 12, 2014
    @duzhe0
    awk 都是一句话的事
    duzhe0
        4
    duzhe0  
    OP
       Apr 12, 2014
    @rrfeng
    就是用awk实现的
    rrfeng
        5
    rrfeng  
       Apr 12, 2014
    @duzhe0
    对啊,所以我觉得没必要……
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2215 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 00:26 · PVG 08:26 · LAX 17:26 · JFK 20:26
    ♥ Do have faith in what you're doing.