小编And*_*iG.的帖子

sed,在 linux 中将 http://cdn1 替换为 https://cdn1

我想http://cdn1.domain.comhttps://cdn1.domain.com200 个 .html 文件替换,但我不知道如何用 sed 做到这一点。

有人可以帮我解决这个问题吗?

sed -i '/http:/\/\cdn1/http:/\/\cdn1/' cum-comand.html
sed: -e expression #1, char 8: unknown command: `\'

sed -i '/http:\/\/cdn1/http:\/\/cdn1/' cum-comand.html
sed: -e expression #1, char 17: extra characters after command
Run Code Online (Sandbox Code Playgroud)

linux sed

10
推荐指数
1
解决办法
2万
查看次数

标签 统计

linux ×1

sed ×1