您的位置: 首页 > IT文章 > sed 指定范围内匹配上就替换 sed 指定范围内匹配上就替换 分类: IT文章 • 2024-01-17 18:45:07 先指定范围,再对匹配上的内容进行替换 sed -i '5,10 s#hello#world#' test.txt