Um momento
Leetcode / 195. Tenth Line

Pick a programming language:

Here is the source code for the solution to this problem.

# Read from the file file.txt and output the tenth line to stdout.
# Solution 1
head -n 10 file.txt | tail -n +10

# Solution 2
# awk 'NR==10' file.txt

# Solution 3
# sed '10!D' file.txt
Gostou da aula? 😆👍
Apoie nosso trabalho com uma doação: