Hi guys,
I have a script that would return the cpu load of a machine. I want to get the numerical part of the output, but I do not know how to do it.
<code snippet>
result="$(snmpget -v 2c -c public localhost -Ov .1.3.6.1.4.1.2021.11.11.0)"
if [${result##INTEGER: }=95]; then
echo $result
fi
</code snippet>
When I execute the command, I get "./montop.sh: line 13: [95=95]: command not found" error. How do I solve this problem? TIA.
edited:
I got the wrong part already. It was in my if statement..
