I need to count the lines from matching config file entries, preferably with 'grep'.
- by Chris
I have a configuration file that has entries for various devices, with each entry separated by a blank line. I need to search the file for all instances of a given device type, and count the number of non-blank lines following the occurrence, stopping at the first blank.
For example:
Server=foo
config line 1
config line 2
config line 3 …