- 文件前几行 head -n 5 $file
- 文件后几行 tail -n -5 $file
- 文件从第几行到结尾 tail -n +5 $file
- 区间行的文件 sed -n '2,5p' $file # 第二行到第5行
linux按行取文件
本文来自博客园,作者:BioinformaticsMaster,转载请注明原文链接:https://www.cnblogs.com/koujiaodahan/p/15793632.html
本文来自博客园,作者:BioinformaticsMaster,转载请注明原文链接:https://www.cnblogs.com/koujiaodahan/p/15793632.html