【发布时间】:2020-06-18 03:50:13
【问题描述】:
假设我的文件中有以下内容
文件1.txt:
some text ...
...
begin
if somthing is true
some text here
...
fi
end
some text
我想用内容替换开始结束之间的文本,包括开始结束
另一个文件
文件2.txt:
while read line:
do
some code
done
替换后的file1.txt应该是这样的
文件1.txt:
some text ...
...
while read line:
do
some code
done
some text
【问题讨论】:
-
到目前为止你做了什么?
-
我无法理解你的问题...
-
您有一些代码要添加到您的问题中吗?
标签: sed substitution paragraph