Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
duzhe0
V2EX  ›  Linux

replacement of 'sort | uniq'

  •  
  •   duzhe0 · Apr 11, 2014 · 3634 views
    This topic created in 4476 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   ·   2614 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 15:43 · PVG 23:43 · LAX 08:43 · JFK 11:43
    ♥ Do have faith in what you're doing.