I have a large dataset, where I want to break the file into smaller files after certain number of rows.
Example, my dataset looks like:
G-1222
1 OBSERVED
0.0000 0.0000
583 COMPUTED
1 3
7 9
15 12
G-1736
1 OBSERVED
0.0012 0.000
583 COMPUTED
5 7
3 6
6 8
The final output will be in the form of multiple output, in this above example 2 outputs
output1.dat
G-1222
1 OBSERVED
0.0000 0.0000
583 COMPUTED
1 3
7 9
15 12
output2.dat
G-1736
1 OBSERVED
0.0012 0.000
583 COMPUTED
5 7
3 6
6 8
Thus in the above example case, every 7 rows the dataset was broken into multiple file.
Any help appreciated. Thanks.
Example, my dataset looks like:
G-1222
1 OBSERVED
0.0000 0.0000
583 COMPUTED
1 3
7 9
15 12
G-1736
1 OBSERVED
0.0012 0.000
583 COMPUTED
5 7
3 6
6 8
The final output will be in the form of multiple output, in this above example 2 outputs
output1.dat
G-1222
1 OBSERVED
0.0000 0.0000
583 COMPUTED
1 3
7 9
15 12
output2.dat
G-1736
1 OBSERVED
0.0012 0.000
583 COMPUTED
5 7
3 6
6 8
Thus in the above example case, every 7 rows the dataset was broken into multiple file.
Any help appreciated. Thanks.