Hi everyone,
I am trying to write a bash script which reads a data file and does some algebraic operations.
here is the structure of data.xml file that I have;
1 <data>
2 .
3 .
4 .
5 </data>
6 <data>
7 .
8 .
9 .
10</data>
etc.
Each data block contains same number of lines (say for example 5 lines)
Q1. How can I find the total number of data blocks in a given data file?
Q2. How can I assign that number to a variable which is going to be used on further lines?
thanks.