mirror of
https://github.com/masonr/yet-another-bench-script.git
synced 2025-11-07 16:01:30 +05:30
Improve the Network Information
Sometimes from ip-api, either ISP or ASN is available, but it would not show since the condition is not satisfied. Fix to show if either value is present
This commit is contained in:
parent
f5cd6f8d13
commit
2b033dd616
1 changed files with 11 additions and 5 deletions
16
yabs.sh
16
yabs.sh
|
|
@ -12,7 +12,7 @@
|
|||
# performance via fio. The script is designed to not require any dependencies
|
||||
# - either compiled or installed - nor admin privileges to run.
|
||||
|
||||
YABS_VERSION="v2023-04-23"
|
||||
YABS_VERSION="v2023-07-08"
|
||||
|
||||
echo -e '# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #'
|
||||
echo -e '# Yet-Another-Bench-Script #'
|
||||
|
|
@ -298,10 +298,16 @@ function ip_info() {
|
|||
echo "$net_type Network Information:"
|
||||
echo "---------------------------------"
|
||||
|
||||
if [[ -n "$isp" && -n "$as" ]]; then
|
||||
echo "ISP : $isp"
|
||||
echo "ASN : $as"
|
||||
fi
|
||||
if [[ -n "$isp" ]]; then
|
||||
echo "ISP : $isp"
|
||||
else
|
||||
echo "ISP : Unknown"
|
||||
fi
|
||||
if [[ -n "$as" ]]; then
|
||||
echo "ASN : $as"
|
||||
else
|
||||
echo "ASN : Unknown"
|
||||
fi
|
||||
if [[ -n "$org" ]]; then
|
||||
echo "Host : $org"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue