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
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
微信扫码登录