I have an integral value:cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq2400000I assign it to a shell variable:CPU_FREQ=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq)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_FREQ2.4+1e9There 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?
Display integral in scientific notation?
bash;shell script;floating point