Find and replace in shell scripting

前端 未结 7 2151
暖寄归人
暖寄归人 2021-02-01 09:20

Is it possible to search in a file using shell and then replace a value? When I install a service I would like to be able to search out a variable in a config file and then repl

7条回答
  •  死守一世寂寞
    2021-02-01 10:16

    Generally a tool like awk or sed are used for this.

    $ sed -i 's/ugly/beautiful/g' /home/bruno/old-friends/sue.txt
    

提交回复
热议问题