shell get given line

C++
# Get line 3 of the output of `seq 10`
seq 10 | awk 'NR==3'
Source

Also in C++: