1.插入指定行 插入第三行前sed '3i\this is a insert line' test.txt 1插入第三行后sed '3a\this is a append line' test.txt 1插入到最后一行sed '$a\this is last line' test.txt