Post History
One way is to use grep: $ grep --count ^ /path/to/the/file The ^ character matches a start of a new line, so it basically counts the number of starting lines.
Answer
One way is to use grep: $ grep --count ^ /path/to/the/file The ^ character matches a start of a new line, so it basically counts the number of starting lines.