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

请教 awk 中关于$$的用法

  •  1
     
  •   ysicing ·
    ysicing · Jun 17, 2019 · 2043 views
    This topic created in 2506 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   ·   3798 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 04:39 · PVG 12:39 · LAX 21:39 · JFK 00:39
    ♥ Do have faith in what you're doing.