【发布时间】:2014-04-25 04:32:42
【问题描述】:
我想使用 shell 脚本在一个文件中插入多行。 让我们考虑一下我的输入文件内容是: input.txt:
abcd
accd
cdef
line
web
现在我必须在 input.txt 文件中的“cdef”行之后插入四行。 插入我的文件后应该是这样的:
abcd
accd
cdef
line1
line2
line3
line4
line
web
我应该使用 shell 脚本进行上述插入。谁能帮帮我?
【问题讨论】: