Download and insert salt string inside wordpress wp-config.php with Bash

前端 未结 10 2287
有刺的猬
有刺的猬 2021-02-13 06:27

How can I insert the content of the variable $SALT in a specific point (line or string) of a file like wp-contet.php from wordpress using Bash script?



        
10条回答
  •  不知归路
    2021-02-13 06:56

    How about using sed?

    cat wp-config.php | sed 's/old_string/new_string/g' > wp-config.php
    

提交回复
热议问题