sed 指定行之间的内容替换
[root@Cobbler logs]# cat aa.txt
qqq
123
ppp
123
====
123
[root@Cobbler logs]# sed -i '2,5s#123#456#' aa.txt
[root@Cobbler logs]# cat aa.txt
qqq
456
ppp
456
====
123
时来天地皆同力,运去英雄不自由
[root@Cobbler logs]# cat aa.txt
qqq
123
ppp
123
====
123
[root@Cobbler logs]# sed -i '2,5s#123#456#' aa.txt
[root@Cobbler logs]# cat aa.txt
qqq
456
ppp
456
====
123