I have data in a text file that consists of both integer and non-integer rows,exmaple data shown as below:
2012    10  6   3   57  22.3    33.18   73.71   0
KP  EP  3   57  36.36               
CET ES  3   58  17.22               
CET EP  3   57  55.12               
DHL ES  3   58  3.62                
2015    10  4   7   42  58  33.17   73.74   1.1
PDA EP  7   43  8.6             
NPR ES  7   43  27.98               
PAL EP  7   43  20.93               
CET ES  7   43  52.31               
CET EP  7   43  30.46               
2009    10  4   11  19  4.6 33.16   73.71   0
CET ES  11  19  59.6                
CET EP  11  19  37.12               
THW EP  11  19  37      
In the above case, my data has 3 sets, each set has one non-integer row and a variable number (2, 6, 10, 15, 40, etc) of non-integer rows. I need to write code that concat the first set of integer and non-integer rows and save it in a text file. Then, it takes the second set and repeats the same process, and saves it again in the same text file followed by the first set, and so on.
(For clarity, I have modified my question in a more generic way so that everyone can easily understand).
 
    