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

请教 awk 中关于$$的用法

  •  1
     
  •   ysicing ·
    ysicing · Jun 17, 2019 · 2142 views
    This topic created in 2571 days ago, the information mentioned may be changed or developed.
    root@2ecb7fe6d0ad:~# cat a.txt
    1
    2 3
    4 a b
    a d zz w
    11 22s sc 1 3
    root@2ecb7fe6d0ad:~# awk '{print $$1}' a.txt
    1
    3
    
    a d zz w
    
    root@2ecb7fe6d0ad:~# awk '{print $$2}' a.txt
    1
    
    4 a b
    a d zz w
    
    

    这个是什么姿势,求教

    Supplement 1  ·  Jun 25, 2019

    具体解释可以参考 Indirect field addressing

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3709 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:45 · PVG 08:45 · LAX 17:45 · JFK 20:45
    ♥ Do have faith in what you're doing.