Kaynağa Gözat

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

Diogo Oliveira de Melo 11 yıl önce
ebeveyn
işleme
be03b0fa21
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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