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

哪位老哥帮忙解答一下,关于 shell 中 IFS 问题

  •  
  •   opsonly · May 3, 2019 · 3821 views
    This topic created in 2586 days ago, the information mentioned may be changed or developed.

    源文件为

    $ cat -E people
    Charlie Smith Sally Smith113$
    122$
    Hank Parker$
    114$
    Jane Bailey 121$
    Bill Williams$
    100$
    
    3 replies    2019-05-03 11:34:41 +08:00
    opsonly
        1
    opsonly  
    OP
       May 3, 2019
    要求输出格式为
    ```
    1: ‘ Charlie Smith 122 ’

    2: ‘ Sally Smith 113 ’

    3: ‘ Hank Parker 114 ’

    4: ‘ Jane Bailey 121 ’

    5: ‘ Bill Williams 100 ’
    ```
    jpmorn
        2
    jpmorn  
       May 3, 2019
    这看着不太有规律啊
    opsonly
        3
    opsonly  
    OP
       May 3, 2019
    考点是 shell 中的 IFS,题意是让通过转换 IFS 来实现,我也有点懵
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   950 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 61ms · UTC 19:36 · PVG 03:36 · LAX 12:36 · JFK 15:36
    ♥ Do have faith in what you're doing.