I'm sure there are many ways to do this: how can I count the number of lines in a text file?
$ <cmd> file.txt
1020 lines
|
I'm sure there are many ways to do this: how can I count the number of lines in a text file?
|
||||
|
|
|
The standard way is with
|
|||
|
|
|
As Michael said, Bash-only
Perl Solutions
and the far less readable:
Awk Solution
|
||||
|
|
|
Steven D forgot GNU
Also, if you want the count without outputting the filename and you're using
Just for the heck of it:
|
|||||||||||||||||||
|