Hi....
I have a data file, which I want to split and write to new file...it looks like this...
Column1 column2 Column 3
1 28.25 36.42 -----Read
5 28.26 36.42
10 28.23 36.43
15 28.22 36.43 --------- write to new file
5 28.94 34.97 --------- Again read
10 28.95 34.98
15 28.96 34.99
20 28.95 34.99
25 28.96 34.99
30 28.96 34.99 ----------Write to another new file
2 28.19 36.43 ---------Again read
3 28.18 36.43
4 28.18 36.43
5 28.18 36.44
6 28.19 36.45
------write to new file..
Depends on the change in value of 1st column, script has to write data to new file...
new file should contain data like this..
1st file
Column1 column2 Column 3
1 28.25 36.42
5 28.26 36.42
10 28.23 36.43
15 28.22 36.43
2nd file
Column1 column2 Column 3
5 28.94 34.97
10 28.95 34.98
15 28.96 34.99
20 28.95 34.99
25 28.96 34.99
30 28.96 34.99
Here I have attached one sample data file please have look...