Leetcode Note: Bash - Tenth Line
Tenth Line - LeetCode
https://leetcode.com/problems/tenth-line/
- Bash で取り組んだメモ
所感
- tail と head の組み合わせて実現できそう
回答
tail -n +10 file.txt | head -n 1- tail コマンドの
-nは取り出す行数というオプションだが+10のようにプラスをつけると、指定した位置から取り出すという動きになる
Tenth Line - LeetCode
https://leetcode.com/problems/tenth-line/
tail -n +10 file.txt | head -n 1-n は取り出す行数というオプションだが +10 のようにプラスをつけると、指定した位置から取り出すという動きになる