Hi,
I want to add numbers based on pattern .
in the below ouput file , i want number to be added after pattern line ---- , ie 1 and next is also 1 and next is 2 and next is 3 after adding 4 numbers say output is 7 should be redirected to another file . like this it should add 4 digits after a pattern ------ and redirect it to file. the input file is always multiple of 4 count will be there.
any help with awk will be appreciated ?
COUNT(*)
----------------------
1
1 rows selected
COUNT(*)
----------------------
1
1 rows selected
COUNT(*)
----------------------
2
1 rows selected
COUNT(*)
----------------------
3
1 rows selected
COUNT(*)
----------------------
2
1 rows selected
COUNT(*)
----------------------
4
1 rows selected
COUNT(*)
----------------------
1
1 rows selected
COUNT(*)
----------------------
2
1 rows selected
