diff --git a/fetch b/fetch index dbcb2796..39d3d58a 100755 --- a/fetch +++ b/fetch @@ -709,7 +709,7 @@ getgpu () { "Mac OS X") gpu=$( \ system_profiler SPDisplaysDataType | \ - awk -F': ' '/^\ *Chipset Model:/ {print $2}' | \ + awk -F': ' '/^\ *Chipset Model:/ {printf $2}' | \ awk '{ printf "%s / ", $0 }' ) gpu=${gpu//'/ $'} @@ -775,8 +775,8 @@ getmemory () { "Mac OS X") memtotal=$(printf "%s\n" "$(sysctl -n hw.memsize)"/1024^2 | bc) - memactive=$(vm_stat | awk '/active / { print $3 }') - memcompressed=$(vm_stat | awk '/occupied/ { print $5 }') + memactive=$(vm_stat | awk '/active / { printf $3 }') + memcompressed=$(vm_stat | awk '/occupied/ { printf $5 }') memused=$(((${memactive//.} + ${memcompressed//.}) * 4 / 1024)) memory="${memused}MB / ${memtotal}MB" ;; @@ -788,7 +788,7 @@ getmemory () { memtotal=${memtotal/\(/} memtotal=${memtotal/MB\)/} - memfree=$(top -d 1 | awk '/Real:/ {print $6}') + memfree=$(top -d 1 | awk '/Real:/ {printf $6}') memfree=${memfree/M/} memused=$((memtotal - memfree)) @@ -863,7 +863,7 @@ getresolution () { "Mac OS X") resolution=$(system_profiler SPDisplaysDataType |\ - awk '/Resolution:/ {print $2"x"$4" "}') + awk '/Resolution:/ {printf $2"x"$4" "}') ;; esac