Ways to get a count of the number of lines in a file:
1. Using the "wc" command
$ wc -l <filename>
2. Using "awk"
$ awk 'END{ print NR }' <filename>
3. Using "sed"
$ sed -n \$= <filename>
Just a little appetizer - nothing heavy!
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.