sed 修改指定行

refer to:https://blog.csdn.net/m0_65638010/article/details/122095252

一般是文本模式匹配

$ sed '/number 3/c\ 
> This is a changed line of text.' data.txt 
This is line number 1. 
This is line number 2. 
This is a changed line of text. 
This is line number 4. 
posted @ 2023-03-04 01:18  风风羊  阅读(76)  评论(0编辑  收藏  举报