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