Need help with awk commands. How to increase precision.
I have a file with 8 columns. I need to total up every row in columns 4 and 7. An example of a line in my file is: http://prntscr.com/3la298 When I awk it, I get http://prntscr.com/3la311 As you can see it doesn't read the values properly and stops at a few figures. How do I make it read everything in the column? Here is my awk file http://prntscr.com/3la4hg
END { printf( "%.8f, %.8f, %.8f\n", totalx, totalpsi, h ) }
Thanks! I'll try that tomorrow when I go back to work.
One question, would that just print it with lots of decimal places? Because when I run it for the whole data file it just adds the 'shortened' values.
Sadly that did not work. I did figure out the source of the problem though. Awk can only read exponents in the form of e and not D. I changed that in my data file and awk runs fine now. Thanks for trying.
Join our real-time social learning platform and learn together with your friends!