Bash tool to get nth line from a file

前端 未结 19 2380
刺人心
刺人心 2020-11-22 08:07

Is there a \"canonical\" way of doing that? I\'ve been using head -n | tail -1 which does the trick, but I\'ve been wondering if there\'s a Bash tool that speci

19条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 08:51

    # print line number 52
    sed '52!d' file
    

    Useful one-line scripts for sed

提交回复
热议问题