A file looks like:
1140.271257 0.002288454025 0.002763420728 0.004142512599 0 0 0 0 0 0 0 0 0 0 0
1479.704769 0.00146621631 0.003190634646 0.003672029231 0 0 0 0 0 0 0 0 0 0 0
1663.276205 0.003379552854 0.04643209167 0.0539399155 0 0 0 0 0 0 0 0 0 0 0 0
Can I use some text processing tool to split it into two files such as:
1:
1140.271257 0.002288454025 0.002763420728 0.00414251259
1479.704769 0.00146621631 0.003190634646 0.003672029231
1663.276205 0.003379552854 0.04643209167 0.0539399155
2:
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0
Just get the first numbers, which are not 0, and then just put the rest in another file... if the file could be named like the original file name with a x1 and x2 or so it would be cool.
0
in your input file in the last line doesn't match with the count of0
in your output – A.B. Sep 09 '15 at 09:25