Changing a file
My program was writing two values to a file side by side - (as two
columns) By some stupid programming mistake I have managed to the
following
fprintf(network_energy_delta_E_BM, "%f\n\t %f\n", delta_network_energy_BM,
network_energy_initial);
"%f\n\t %f\n"
Means that my data ended up looking a bit like this:
1234
56
24
99
and so on and so forth. This causing some problems for me and what I need
to do.. Is there any way to amend the file so that they are side by side?
I tried
paste network_energy_delta_E_BM.dat foo.dat | awk '{ print $1 }' > new.dat
where network_energy_delta_E_BM.dat is my file and foo.dat is just an
empty file. But it takes all the entries and just puts them into one
column. Can anyone help fix these please?
Thank you
No comments:
Post a Comment