582033
V2EX  ›  问与答

uniq 命令疑问

  •  
  •   582033 · Sep 25, 2017 · 1867 views
    This topic created in 3331 days ago, the information mentioned may be changed or developed.

    文件内容如下:

    1 1
    2 2
    3 3
    3 4
    5 5
    6 6
    

    使用命令 uniq -f 2 输出结果为

    1 1
    

    疑问

    命令: uniq -f 2不应该是忽略第二列, 应该输出如下结果么?

    1
    2
    3
    5
    6
    
    5 replies  •  2017-09-25 10:22:27 +08:00
    wellsc
    wellsc
    Sep 25, 2017 via iPhone
    1
    man uniq
    582033
    582033
    OP
    Sep 25, 2017
    2
    @wellsc man 过了
    kiwi95
    kiwi95
    Sep 25, 2017
    3
    ```
    -f, --skip-fields=N
    avoid comparing the first N fields
    ```
    the first N fields 不是第 N 列
    SaulLawliet
    SaulLawliet
    Sep 25, 2017
    4
    避免比较前 N 个字段, 不是忽略.
    582033
    582033
    OP
    Sep 25, 2017
    5
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1596 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:53 · PVG 20:53 · LAX 04:53 · JFK 07:53
    ♥ Do have faith in what you're doing.