题解 | #打印文件的最后5行#

打印文件的最后5行

http://www.nowcoder.com/practice/ff6f36d357d24ce5a0eb817a0ef85ee2

  1. 查看文件前5行:
head -5 nowcoder.txt
  1. 查看文件后5行:
tail -5 nowcoder.txt
  1. 查看文件中间5行:
sed -n '6,10p' nowcoder.txt
全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务