V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
ysicing
V2EX  ›  Linux

请教 awk 中关于$$的用法

  •  1
     
  •   ysicing ·
    ysicing · 2019-06-17 16:24:37 +08:00 · 1711 次点击
    这是一个创建于 1841 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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
    
    

    这个是什么姿势,求教

    第 1 条附言  ·  2019-06-25 00:19:50 +08:00

    具体解释可以参考 Indirect field addressing

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3462 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 00:50 · PVG 08:50 · LAX 17:50 · JFK 20:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.