195. Tenth Line

来源:互联网 发布:手机淘宝网手机淘宝 编辑:程序博客网 时间:2024/06/05 07:47

How would you print just the 10th line of a file?

For example, assume that file.txt has the following content:

Line 1Line 2Line 3Line 4Line 5Line 6Line 7Line 8Line 9Line 10
Your script should output the tenth line, which is:
Line 10

[show hint]

Subscribe to see which companies asked this question


awk 'NR==10' file.txt


0 0