I'm trying to do some calculation in shell script with CPU usage. Which return floating point number. But when I subtract this number I'm getting error. See the following code and error.
#!/bin/sh CPU_IDLE=98.67 echo $CPU_IDLE CPU_USAGE=$(( 100 - $CPU_IDLE )) echo $CPU_USAGE
./poc.sh: line 14: 100 - 98.67 : syntax error: invalid arithmetic operator (error token is ".67 ")