Linux Terminal Glossary
›
Text Processing
awk 'END{print NR}' file.txt
Category:
Text Processing
awk 'END{print NR}' file.txt
Copy command
Print the total number of lines in a file
NR at the END block holds the total number of lines processed — a way to count lines using awk.
Looking for more?
Search all 7,657 commands
— works offline, in English or Spanish, and fixes typos.