linux下取出文本文件第100行到第200行的内容可以怎么做?

如题,跪求高手解答。
2025年03月26日 09:11
有2个网友回答
网友(1):

sed -n '100,200p' inputfile
awk 'NR>=100&&NR<=200{print}' inputfile
head -200 inputfile|tail -100

网友(2):

tail -n -100 xxxx.xxx | head -n 200