第十行-leetcode


第十行

目录
  • 1. 地址
  • 2. 解法

shell 编程题目

1. 地址

https://leetcode-cn.com/problems/tenth-line/comments/

2. 解法

最简洁的做法:

awk 'NR==10' file.txt # NR 代表是行数
或者:
sed -n 10p file.txt

相关