Answers for "how to compare percentage value in shell script"

0

how to compare percentage value in shell script

size=$(df -kh | awk '$6 == "/var" {print $5}')
size=${size%"%"}
if (( size < 80 )); then
    echo "/var is less than 80 % full"
fi
Posted by: Guest on February-01-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language