OS X memory: Remove the need for 'bc'
This commit is contained in:
parent
8b02c2de37
commit
15c6720c26
1 changed files with 1 additions and 1 deletions
2
neofetch
2
neofetch
|
@ -1401,7 +1401,7 @@ getmemory () {
|
||||||
;;
|
;;
|
||||||
|
|
||||||
"Mac OS X" | "iPhone OS")
|
"Mac OS X" | "iPhone OS")
|
||||||
memtotal="$(printf "scale=0; %s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc)"
|
memtotal="$(($(sysctl -n hw.memsize) / 1024 / 1024))"
|
||||||
memwired="$(vm_stat | awk '/wired/ { print $4 }')"
|
memwired="$(vm_stat | awk '/wired/ { print $4 }')"
|
||||||
memactive="$(vm_stat | awk '/active / { printf $3 }')"
|
memactive="$(vm_stat | awk '/active / { printf $3 }')"
|
||||||
memcompressed="$(vm_stat | awk '/occupied/ { printf $5 }')"
|
memcompressed="$(vm_stat | awk '/occupied/ { printf $5 }')"
|
||||||
|
|
Loading…
Reference in a new issue