blob: 042596dc779aa2e8364f6df9db13d1d7ef135126 (
plain)
1
2
3
4
5
6
|
#!/bin/bash
line=$(free -m | sed -n 2p);
used=$(echo $line | awk '{print $3}');
available=$(echo $line | awk '{print $2}');
echo "" $(printf "%dMB" $used) $(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1)
|