Grep statement simplified.

pull/22/head
Dominik Ritter 9 years ago
parent fccc3d5e64
commit 730697893e

@ -571,7 +571,7 @@ prompt_ip() {
prompt_load() {
if [[ "$OS" == "OSX" ]]; then
load_avg_5min=$(sysctl vm.loadavg | grep -o -E -e '[0-9]+\.[0-9]+' | head -n 1)
load_avg_5min=$(sysctl vm.loadavg | grep -o -E '[0-9]+\.[0-9]+' | head -n 1)
ramfree=$(vm_stat | grep "Pages free" | grep -o -E '[0-9]+')
# Convert pages into Bytes
ramfree=$(( $ramfree * 4096 ))

Loading…
Cancel
Save