aboutsummaryrefslogtreecommitdiff
path: root/bin/mem
blob: dab317d904929900f4306143508ea306e04f24a8 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/env bash

# sends used memory to stdout
mem() {
	mem="$(free | grep Mem | awk ' { print $3/$2 * 100 } ')"
	
	printf "%s %.0f%%" "" "$mem"
}

mem