Text filters · Question 10 of 12

Which pipeline prints exactly the tenth line of file.txt?

1 answer is correct. Medium Created with AI

Show answer

Answer

  • C head -n 10 file.txt | tail -n 1

Explanation

head returns lines 1 to 10, tail the last of them. The second pipeline would return the tenth line from the end.

Certifications & exams

Which exam comes next?

You can already practise for 51 exams, and 16 are up for a vote. See all certifications with their official information, cast your vote or suggest your exam.

See all certifications