Ver Fonte

This change seems more flexible and rely on the assumption that it comes after the last :

Diogo Oliveira de Melo há 11 anos atrás
pai
commit
be03b0fa21
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      check_load.sh

+ 1 - 1
check_load.sh

@@ -64,7 +64,7 @@ determine_command () {
 if [[ "$OS" == osx ]]; then
 	UPTIME=$(uptime | awk -F : '{ print $4 }')
 elif [[ "$OS" == linux ]]; then
-	UPTIME=$(uptime | awk -F : '{ print $4 }' | sed 's/,//g')
+	UPTIME=$(uptime |sed 's/.*: //' | sed 's/,//g')
 elif [[ "$OS" == freebsd ]]; then
 	UPTIME=$(uptime | awk -F : '{ print $4 }' | sed 's/,//g')
 elif [[ "$OS" == aix ]]; then