sed -n 'm,np'查看文件的m行~n行的信息
➜ cafe2cold cat test.txt
line1
line2
line3
line4
➜ cafe2cold sed -n '2,3p' test.txt
line2
line3
➜ cafe2cold cat test.txt
line1
line2
line3
line4
➜ cafe2cold sed -n '2,3p' test.txt
line2
line3
本文标题:sed -n 'm,np'显示文件指定行
本文链接:https://www.haomeiwen.com/subject/jluloktx.html
网友评论