sed 指定范围内匹配上就替换

先指定范围,再对匹配上的内容进行替换

sed     -i  '5,10  s#hello#world#' test.txt

posted @ 2021-04-07 19:38  Cetus-Y  阅读(991)  评论(0编辑  收藏  举报