sed删除指定行数 #sed删除指定行及之后的2两行 root@mail ~ # echo '1 > 2 > 3 > 4 > 5 > 6 > 7 > 8' | sed '/5/,+2d' 1 2 3 4 8 Tags: sed删除指定行及之后的两行, sed详解 Read more articles Previous Postsed正则 Next Postsed合并偶数行到上一行 You Might Also Like grep,sed,awk,perl等对正则表达式的支持的差别 January 25, 2017 sed删除多余空行 March 26, 2013 sed模式空间与暂存空间 May 29, 2014