Просмотр исходного кода

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

Diogo Oliveira de Melo 11 лет назад
Родитель
Сommit
be03b0fa21
1 измененных файлов с 1 добавлено и 1 удалено
  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