1
我用Putty替換了「sed」,我發現這個詞已被替換,但是當我在cpanel中打開文件時,文件沒有變化。爲什麼通過膩子改變「sed」不反映在cpanel?
這裏的命令
sed 's/word1/word2/g' file.php
爲什麼會出現這種情況?
我用Putty替換了「sed」,我發現這個詞已被替換,但是當我在cpanel中打開文件時,文件沒有變化。爲什麼通過膩子改變「sed」不反映在cpanel?
這裏的命令
sed 's/word1/word2/g' file.php
爲什麼會出現這種情況?
sed 's/word1/word2/g' file.php
打印出更改後的文件版本。如果要在原地修改文件,請使用-i
選項:
sed 's/word1/word2/g' -i file.php