Hi All,
I have a file with 1215450 lines long, here is few lines:
1.06189E-08 0.6320 0.00000E+00 0.0000 0.00000E+00 0.0000 2.66971E-09 1.0000
0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
1.27355E-10 1.0000 7.50482E-10 1.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
I'd like to print $1, $3, $5, $7 from each line and put the results in lines with 146 fields ==> 1215450 lines * 4 fields ($1, $3, $5, $7) = 4861800 fields
4861800 fields / 146 fields = 33300 lines
i.e. the final file will have 33300 lines with 146 fields for each line... I can simply print ($1, $3, $5, $7) but how can I put them in 146-field lines?..
Thanks
I have a file with 1215450 lines long, here is few lines:
1.06189E-08 0.6320 0.00000E+00 0.0000 0.00000E+00 0.0000 2.66971E-09 1.0000
0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
1.27355E-10 1.0000 7.50482E-10 1.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
I'd like to print $1, $3, $5, $7 from each line and put the results in lines with 146 fields ==> 1215450 lines * 4 fields ($1, $3, $5, $7) = 4861800 fields
4861800 fields / 146 fields = 33300 lines
i.e. the final file will have 33300 lines with 146 fields for each line... I can simply print ($1, $3, $5, $7) but how can I put them in 146-field lines?..
Thanks