403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/misc/ansiweather/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/misc/ansiweather/files/patch-ansiweather
--- ansiweather.orig	2016-10-18 17:14:59 UTC
+++ ansiweather
@@ -205,7 +205,7 @@ then
 	forecast=$([ "$forecast" -gt "$flength" ] && echo "$flength" || echo "$forecast")
 else
 	city=$(echo "$weather" | jq -r '.name')
-	temperature=$(echo "$weather" | jq '.main.temp' | xargs printf "%.0f")
+	temperature=$(echo "$weather" | jq '.main.temp' | xargs gprintf "%.0f")
 	humidity=$(echo "$weather" | jq '.main.humidity')
 	pressure=$(echo "$weather" | jq '.main.pressure')
 	sky=$(echo "$weather" | jq -r '.weather[0].main')
@@ -285,7 +285,7 @@ case $units in
 		scale="°C"
 		speed_unit="m/s"
 		pressure_unit="hPa"
-		pressure=$(echo "$pressure" | xargs printf "%.0f")
+		pressure=$(echo "$pressure" | xargs gprintf "%.0f")
 		;;
 	imperial)
 		scale="°F"
@@ -293,7 +293,7 @@ case $units in
 		pressure_unit="inHg"
 		if [ "$forecast" = 0 ]
 		then
-			pressure=$(echo "$pressure*0.0295" | bc | xargs printf "%.2f")
+			pressure=$(echo "$pressure*0.0295" | bc | xargs gprintf "%.2f")
 		fi
 		;;
 esac
@@ -349,8 +349,8 @@ then
 	do
 		day=$(echo "$weather" | jq ".list[$i]")
 		date=$(epoch_to_date "$(echo "$day" | jq -r '.dt')")
-		low=$(echo "$day" | jq -r '.temp.min' | xargs printf "%.0f")
-		high=$(echo "$day" | jq -r '.temp.max' | xargs printf "%.0f")
+		low=$(echo "$day" | jq -r '.temp.min' | xargs gprintf "%.0f")
+		high=$(echo "$day" | jq -r '.temp.max' | xargs gprintf "%.0f")
 
 		icon=""
 		if [ "$symbols" = true ]
@@ -397,7 +397,7 @@ fi
 
 if [ "$ansi" = true ]
 then
-	env printf "$output\033[0m\n"
+	env gprintf "$output\033[0m\n"
 else
-	env printf "$output\n" | sed "s/$(printf '\033')\[[0-9;]*m//g"
+	env gprintf "$output\n" | sed "s/$(gprintf '\033')\[[0-9;]*m//g"
 fi

Youez - 2016 - github.com/yon3zu
LinuXploit