Page 1 of 1

SUM Fields between two lines

PostPosted: Fri Nov 17, 2017 10:22 pm
by zvawn
Hi,

I am trying to sum the number of occurrences between two lines in a file. For example:


START                  00000
  FIELD1               00001
  FIELD2               00001
END                    0000X
 


With the above input I would like to return something like:

START                  00002
 


I am lost on how to do this with sort. Any help would be appreciated.

Re: SUM Fields between two lines

PostPosted: Fri Nov 17, 2017 11:34 pm
by enrico-sorichetti