aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/memory
blob: e9e6f8df10aabebd7c23d03b9bd67657766030f0 (plain)
1
2
3
4
5
6
7
8
#!/bin/bash

line=$(free -m | sed -n 2p);
used=$(echo $line | awk '{print $3}');
available=$(echo $line | awk '{print $2}');
value=$(echo "100 * $used / $available" | bc -l | xargs printf "%.2f" $1)

echo "⾝ $(printf "%dMB" $used) $value%"