我在一个非常大的文档中有以下字符串:
1.test.html# 2.test.md# 3.http://test.html# 4.https://test.md# 5.http://test.md# 6.test2.md#
现在我想.md#用.html#但仅当http字符串中没有时替换每个。所以只有 2 和 6 应该有一个替代品。如何在 shell 脚本中执行此操作?
.md#
.html#
http
sed shell-script
sed ×1
shell-script ×1