第十行-leetcode

第十行


shell 编程题目

1. 地址

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

2. 解法

最简洁的做法:

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

猜你喜欢

转载自www.cnblogs.com/wudanyang/p/13170303.html