sed删除两行之间的内容

$ cat test
1
start
2
end
3

$ sed -n '1,/start/p;/end/,$p' test 1 start end 3

$ sed '/start/,/end/d' test 1 3

猜你喜欢

转载自www.cnblogs.com/chenminklutz/p/10303676.html