I have one complex text file named "output.txt"
. . . ~~~ output final hypocenters ... date origin latitude longitude depth mag no rms x y z 1 960415 0839 55.21 21.5634N 105.7475E 19.88 0.00 12 0.982 -227.88 -35.17 19.88 . . .1837 180326 0439 56.97 21.5877N 103.9346E 21.37 0.00 11 1.062 -40.30 -32.47 21.37 ~~~ output final station residuals ... ...
and i need to copy the part on this file into "final_hypos.out" file
date origin latitude longitude depth mag no rms x y z 1 960415 0839 55.21 21.5634N 105.7475E 19.88 0.00 12 0.982 -227.88 -35.17 19.88 . . .1837 180326 0439 56.97 21.5877N 103.9346E 21.37 0.00 11 1.062 -40.30 -32.47 21.37
the string to detect the data " ~~~ output final hypocenters …" and " ~~~ output final station residuals …" only one time in file.
Any way to do this. I tried several way but it not success.
I attach the file here also
Thanks in advance
Best Answer