I have an integral value:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 2400000
I assign it to a shell variable:
I want to display it in scientific format from within a shell script using bash. In addition, I need to use it as an argument to a program. Here's what I want:
echo $CPU_FREQ 2.4+1e9
There are some hits on the web, but its not obvious to me how to modify them because I usually work with C/C++/Objective C. See, for example, bash display integral in scientific notation and Remove scientific notation bash script.
Is there a way to convert an integral into scientific notation?
Or how do I display the value scientific notation?