How to convert floating point numbers in fortran format to decimals using shell (bash) tools? -


How can the floating point number change in decimal using the shell tool? For example: I have 0.17879D-13 as input and 0.000000000000017879 as output. I tried awk and BC but could not succeed.

Now I have found something. I use sed to replace "D" from "E", then awk can process it, for example:

echo 0.17879D-13 | Sed S / D / E / G | Awk '{printf ("% .20f \ n", $ 1)}'


Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -