#!/bin/sh ram=$(awk ' /MemTotal/ { total = $2 } /Active:/ { active = $2 } END {print int((active/total)*100)} ' /proc/meminfo) echo ": $ram%" echo "R: $ram" if [ "$ram" -gt 80 ]; then echo "#FF0000" fi