From 603a0d38fb35edca566f6368f34eb9e8e5fc1938 Mon Sep 17 00:00:00 2001 From: Spaghetti Date: Sun, 2 Sep 2012 22:59:31 -0500 Subject: [PATCH] While we're at it, let's fix that OS X memory detection bug I introduced --- screenfetch-dev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/screenfetch-dev b/screenfetch-dev index 1a83f86e..49bcd978 100644 --- a/screenfetch-dev +++ b/screenfetch-dev @@ -508,7 +508,7 @@ detectmem () { if [ "$distro" == "Mac OS X" ]; then totalmem=$(echo "$(sysctl -n hw.memsize)"/${human}^2|bc) # usedmem=$(echo "$(sysctl -n hw.usermem)"/1024^2|bc) - usedmem=$(echo "$(top -l 1 | awk '/PhysMem/' | grep -o \[0-9]\*M | tail -2 | head -1)B") + usedmem=$(echo "$(top -l 1 | awk '/PhysMem/' | grep -o \[0-9]\*'M used' | grep -o \[0-9]\*)") elif [ "$distro" == "FreeBSD" ]; then phys_mem=$(sysctl -n hw.physmem) size_mem=$phys_mem