1: Test Environment
[root@xilong startimes]# seq 100 > xilong.txt
[root@xilong startimes]# cat xilong.txt
2: head + tail
[root@xilong startimes]# head -30 xilong.txt | tail -11
3: sed -n '20,30p' xilong.txt
[root@xilong startimes]# sed -n '20,30p' xilong.txt
4: awk
[root@xilong startimes]# awk 'NR==20,NR==30' xilong.txt
5:awk
[root@xilong startimes]# awk 'NR>=20 && NR<=30' xilong.txt
6:grep
[root@xilong startimes]# grep -A10 "20" xilong.txt
[root@xilong startimes]# grep -B10 "30" xilong.txt
[root@xilong startimes]# grep -C5 "25" xilong.txt