I want to break a large file into multiple file based on first two columns:
For example my file is as follows:
87.73,49.62,-45.000000,0,-261581.000000,0.000000,1,1
87.73,49.62,-45.000000,0,-261581.000000,0.000000,2,2
87.73,49.62,-45.000000,0,-261581.000000,0.000000,3,3
87.74,49.63,-45.000000,0,-261581.000000,0.000000,4,4
87.74,49.63,-45.000000,0,-261581.000000,0.000000,5,5
87.74,49.63,-45.000000,0,-261581.000000,0.000000,6,6
87.74,49.63,-45.000000,0,-261581.000000,0.000000,7,7
The Final results should look like:
File 1
87.73,49.62,-45.000000,0,-261581.000000,0.000000,1,1
87.73,49.62,-45.000000,0,-261581.000000,0.000000,2,2
87.73,49.62,-45.000000,0,-261581.000000,0.000000,3,3
File 2
87.74,49.63,-45.000000,0,-261581.000000,0.000000,4,4
87.74,49.63,-45.000000,0,-261581.000000,0.000000,5,5
87.74,49.63,-45.000000,0,-261581.000000,0.000000,6,6
87.74,49.63,-45.000000,0,-261581.000000,0.000000,7,7
Any help will be appreciated.
Thanks.
For example my file is as follows:
87.73,49.62,-45.000000,0,-261581.000000,0.000000,1,1
87.73,49.62,-45.000000,0,-261581.000000,0.000000,2,2
87.73,49.62,-45.000000,0,-261581.000000,0.000000,3,3
87.74,49.63,-45.000000,0,-261581.000000,0.000000,4,4
87.74,49.63,-45.000000,0,-261581.000000,0.000000,5,5
87.74,49.63,-45.000000,0,-261581.000000,0.000000,6,6
87.74,49.63,-45.000000,0,-261581.000000,0.000000,7,7
The Final results should look like:
File 1
87.73,49.62,-45.000000,0,-261581.000000,0.000000,1,1
87.73,49.62,-45.000000,0,-261581.000000,0.000000,2,2
87.73,49.62,-45.000000,0,-261581.000000,0.000000,3,3
File 2
87.74,49.63,-45.000000,0,-261581.000000,0.000000,4,4
87.74,49.63,-45.000000,0,-261581.000000,0.000000,5,5
87.74,49.63,-45.000000,0,-261581.000000,0.000000,6,6
87.74,49.63,-45.000000,0,-261581.000000,0.000000,7,7
Any help will be appreciated.
Thanks.