|
12 | 12 | # performance via fio. The script is designed to not require any dependencies |
13 | 13 | # - either compiled or installed - nor admin privileges to run. |
14 | 14 |
|
15 | | -YABS_VERSION="v2023-11-24" |
| 15 | +YABS_VERSION="v2023-11-30" |
16 | 16 |
|
17 | 17 | echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #' |
18 | 18 | echo -e '# Yet-Another-Bench-Script #' |
@@ -273,26 +273,13 @@ function ip_info() { |
273 | 273 | return |
274 | 274 | fi |
275 | 275 |
|
276 | | - local country=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^country/ {print $2}' | head -1) |
277 | | - country=${country//\"} |
278 | | - |
279 | | - local region=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^regionName/ {print $2}') |
280 | | - region=${region//\"} |
281 | | - |
282 | | - local region_code=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^region/ {print $2}' | head -1) |
283 | | - region_code=${region_code//\"} |
284 | | - |
285 | | - local city=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^city/ {print $2}') |
286 | | - city=${city//\"} |
287 | | - |
288 | | - local isp=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^isp/ {print $2}') |
289 | | - isp=${isp//\"} |
290 | | - |
291 | | - local org=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^org/ {print $2}') |
292 | | - org=${org//\"} |
293 | | - |
294 | | - local as=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^as/ {print $2}') |
295 | | - as=${as//\"} |
| 276 | + local country=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^country/ {print $2}' | head -1 | sed 's/^"\(.*\)"$/\1/') |
| 277 | + local region=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^regionName/ {print $2}' | sed 's/^"\(.*\)"$/\1/') |
| 278 | + local region_code=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^region/ {print $2}' | head -1 | sed 's/^"\(.*\)"$/\1/') |
| 279 | + local city=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^city/ {print $2}' | sed 's/^"\(.*\)"$/\1/') |
| 280 | + local isp=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^isp/ {print $2}' | sed 's/^"\(.*\)"$/\1/') |
| 281 | + local org=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^org/ {print $2}' | sed 's/^"\(.*\)"$/\1/') |
| 282 | + local as=$(echo "$response" | sed -e 's/[{}]/''/g' | awk -v RS=',"' -F: '/^as/ {print $2}' | sed 's/^"\(.*\)"$/\1/') |
296 | 283 |
|
297 | 284 | echo |
298 | 285 | echo "$net_type Network Information:" |
|
0 commit comments