adspace
How to print/display the first line of a file in Unix?
Answer Posted / Rishabh Kanthariya
To display the first line of a file in Unix, you can use the `head` command with an argument specifying the number of lines. In this case, since we want only the first line, we use `head -n 1`. Here's an example: `head -n 1 filename.txt`
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers