0
点赞
收藏
分享

微信扫一扫

sed插入行

Ewall_熊猫 2022-06-09 阅读 168

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

 


举报

相关推荐

0 条评论