sed -n 'm,np'显示文件指定行
2021-01-12 本文已影响0人
香波地海
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