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