Skip to content
Advertisement

Convert Scientific Notation into decimal number using bash [closed]

I need to convert 1.22661727081984E+002 to 122.661727081984 using shell script. I have tried it using the below command:

JavaScript

output:

JavaScript

It is giving me the output but rounding off the last 4 digits.

I need the output without rounding off the result.

Advertisement

Answer

Using Bash’s printf:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement