Skip to content

Commit

Permalink
Fixed alias usage in bh_ipinfo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Dussa committed Feb 25, 2021
1 parent 77ad764 commit 1d1e93d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/net/bh_ipinfo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ bh_ipinfo()
local ipaddress="${1:-`bh_myip`}"
local url="http://ipinfo.io"

local company="$(bh_cmd_wget -qO - "$url/$ipaddress/org")"
local company=$(bh_cmd_wget -qO - "$url/$ipaddress/org")

This comment has been minimized.

Copy link
@andry81

andry81 Oct 14, 2022

What this fixes?

local asreg="${company%% *}"

echo "$company"

[[ -n "$company" ]] && bh_cmd_wget -qO - "$url/$asreg" \
| grep "$asreg/" \
| sed 's/<[^>]*>//g; s/^ *//g'
}
}

0 comments on commit 1d1e93d

Please sign in to comment.