Explorar el Código

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

Diogo Oliveira de Melo hace 11 años
padre
commit
be03b0fa21
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      check_load.sh

+ 1 - 1
check_load.sh

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