mem.sh (102B)
1 #!/usr/bin/env bash 2 3 MEM=$(free -m | grep Mem | awk '{printf "%03d", ($3/$2)*100}') 4 5 echo " $MEM%"