Perl: How do I remove the first line of a file without reading and copying whole file

前端 未结 6 1262
刺人心
刺人心 2021-01-01 19:06

I do have a whole bunch of files in a directory and from every file I want to remove the first line (including carriage return). I can read the whole file into an array of s

6条回答
  •  清酒与你
    2021-01-01 19:43

    How about

    tail +2
    

    in shell?

    (edit: in newer Linux you may need tail -n +2 (thank you, GNU! :( ))

提交回复
热议问题