Tenth Line
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 10Solutions
π² Bash
Last updated
Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 10Last updated
# Read from the file file.txt and output the tenth line to stdout.
if [ $(wc -l file.txt | cut -f1 -d' ') -gt 9 ]
then
cat file.txt | head -n 10 | tail -n 1
fi