- 使用sed打印第99行
sed -n '99,p' test.txt
- 使用awk打印第99行
awk 'NR==99' test.txt
awk 'FNR==99' test.txt
- perl 完成
perl -lane 'if($.==99){print $_}' test.txt
sed -n '99,p' test.txt
awk 'NR==99' test.txt
awk 'FNR==99' test.txt
perl -lane 'if($.==99){print $_}' test.txt