+3 votes
in Programming Languages by (56.5k points)
I have a very big file. How can I get the last line of that file using awk.

1 Answer

+1 vote
by (348k points)
selected by
 
Best answer

Try the following awk command:

$ awk 'END{print}' filename

You can also print the last line of your file using the following command:

$ tail -1 filename
 


...