linux按行取文件
- 文件前几行 head -n 5 $file
- 文件后几行 tail -n -5 $file
- 文件从第几行到结尾 tail -n +5 $file
- 区间行的文件 sed -n '2,5p' $file # 第二行到第5行
本文来自博客园,作者:BioinformaticsMaster,转载请注明原文链接:https://www.cnblogs.com/koujiaodahan/p/15793632.html
posted on 2022-01-12 17:42 BioinformaticsMaster 阅读(62) 评论(0) 收藏 举报
 
                    
                 
                
            
         
 浙公网安备 33010602011771号
浙公网安备 33010602011771号