简体   繁体   中英

Why would change with “sed” via Putty not reflect in Cpanel?

I did a word replace with "sed" via Putty and i see that the word was replaced but when I open the file in cpanel there is no change to the file.

Here's the command

sed 's/word1/word2/g' file.php

Why would this happen?

sed 's/word1/word2/g' file.php

prints out the changed version of the file. If you want to modify the file in-place, use the -i option:

sed 's/word1/word2/g' -i file.php

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM