How do I read the first line of a file using cat?

前端 未结 11 784
渐次进展
渐次进展 2021-01-29 22:20

How do I read the first line of a file using cat?

11条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-29 22:36

    There are many different ways:

    sed -n 1p file
    head -n 1 file
    awk 'NR==1' file
    

提交回复
热议问题