count lines bash code example
Example 1: shell count lines output
$ somecommand | wc -l
Example 2: count new lines bash
command | wc -l
wc -l < some_file.txt
$ somecommand | wc -l
command | wc -l
wc -l < some_file.txt