[Linux] centos 打印文件10-20行(多种方法)
head 和 tail
head -20 test.txt| tail -10
sed
sed -n '10,20p' test.txt
awk
awk 'NR>9 && NR<21' test.txt
head 和 tail
head -20 test.txt| tail -10
sed
sed -n '10,20p' test.txt
awk
awk 'NR>9 && NR<21' test.txt