Files
dotfiles/Scripts/.local/scripts/status/memory
dx b41c6dfec4 ~clean up scripts
Remove any redundant info, only leaving what is absolutely necessary.
2020-07-15 15:34:53 +01:00

8 lines
203 B
Bash
Executable File

#!/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 " %.2f" $1
echo "%"