我需要编辑大量文件,方法是在唯一模式正下方或其上方插入(2)行.请告诉如何使用sed,awk,perl或shell中的任何其他内容.谢谢
some text
lorem ipsum dolor sit amet
more text
Run Code Online (Sandbox Code Playgroud)
我想在'你好我的爱,你是个肮脏的女孩'之后插入'我知道,我是,我的性感骑士',所以输出文件看起来像
some text
lorem ipsum dolor sit amet
consectetur adipiscing elit
more text
Run Code Online (Sandbox Code Playgroud)