Linux sed 输出指定行

n,m 表示 n 到m行,这里用 4p;5p 也行,从指定行输出到末尾使用$

test.txt 是输入文件

sed -n '4,5p' test.txt

sed -n '4,$p' test.txt

 

你可能感兴趣的:(#,Linux)