Hi, I'm running via PuTTY, in a BASH shell to do my work. I'm running calculations where steps are reported like this every 100 steps:
NSTEP = 249900 TIME(PS) = 249.900 TEMP(K) = 299.94 PRESS = 21.1
Etot = -12912.5557 EKtot = 4996.8780 EPtot = -17909.4336
BOND = 3502.4858 ANGLE = 39.5581 DIHED = 13.5982
1-4 NB = 2.4191 1-4 EEL = 71.3522 VDWAALS = 3805.6043
EELEC = -25344.4513 EHBOND = 0.0000 RESTRAINT = 0.0000
EKCMT = 1624.0988 VIRIAL = 1599.4088 VOLUME = 54265.8517
Density = 1.0280
Ewald error estimate: 0.2435E-03
------------------------------------------------------------------------------
NSTEP = 250000 TIME(PS) = 250.000 TEMP(K) = 300.29 PRESS = 193.8
Etot = -12881.4528 EKtot = 5002.6739 EPtot = -17884.1267
BOND = 3487.9960 ANGLE = 41.0739 DIHED = 11.4793
1-4 NB = 1.8325 1-4 EEL = 68.9061 VDWAALS = 3810.8825
EELEC = -25306.2971 EHBOND = 0.0000 RESTRAINT = 0.0000
EKCMT = 1674.6162 VIRIAL = 1447.5445 VOLUME = 54268.4640
Density = 1.0280
Ewald error estimate: 0.2073E-03
------------------------------------------------------------------------------
I need to create data files showing the Etot (for example) over all 2500 entries. I've tried grep "Etot" filename > newfile but then I get something like this:
Etot = -8020.5755 EKtot = 0.0000 EPtot = -8020.5755
Etot = -7327.1765 EKtot = 359.4934 EPtot = -7686.6698
Etot = -6736.4171 EKtot = 625.2909 EPtot = -7361.7080
Etot = -6290.5101 EKtot = 865.9846 EPtot = -7156.4947
Etot = -5896.3326 EKtot = 1039.1907 EPtot = -6935.5234
Etot = -5563.3851 EKtot = 1213.5608 EPtot = -6776.9459
Etot = -5307.6959 EKtot = 1316.2096 EPtot = -6623.9055
So far, I've just been marking and killing the columns I don't need (ctrl+space at top, ctrl+x at bottom opposite corner of column,r,k), but it's slow when you have 2500 lines. I'm coming up on data that will have 10000 lines and I need to do this quicker. I desire something like this ( which would just be the data for only the Etot column, minus the Etot = portion):
-8020.5755
-7327.1765
-6736.4171
-6290.5101
-5896.3326
-5563.3851
-5307.6959
The only reason I mention variables here is that it might be saving it as a variable when it reports it to the output file. I'm not sure though, since I'm still a newbie at Unix