Awk will eventually use scientific notation for very large numbers unfortunately.
This is where you can use paste and bc. The command 'paste -sd+' will output the file contents as line1+line2+etc. This is essentially just formatting for input in to bc. Very useful when adding up large numbers in a file.
paste -sd+ | bc |
No comments:
Post a Comment