Steven D forgot GNU sed
:
sed -n '$=' file.txt
Also, if you want the count without outputting the filename and you're using wc
:
wc -l < file.txt
Just for the heck of it:
cat -n file.txt | tail -n 1 | cut -f1
Steven D forgot GNU sed
:
sed -n '$=' file.txt
Also, if you want the count without outputting the filename and you're using wc
:
wc -l < file.txt
Just for the heck of it:
cat -n file.txt | tail -n 1 | cut -f1