diff options
-rwxr-xr-x | bin/get_mem | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bin/get_mem b/bin/get_mem new file mode 100755 index 0000000..1709d75 --- /dev/null +++ b/bin/get_mem @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -euo pipefail +IFS=$'\n\t' + +mem_output="" +mem_output="$(free -hm| grep "Mem:"| awk '{printf $3 "/" $2 " ("} {printf ("%1.3f", $3/$2)} {printf ")"}')" + +echo "$mem_output" |