====== BASH - Files - Count the lines in a file ====== ===== Using awk ===== awk 'END{print NR}' filename ---- ===== Using wc ===== wc -l filename
awk 'END{print NR}' filename
wc -l filename