blob: 132b090a280cbd1e1dfa88e23336d0382f0e5dde (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/bash
function __network() {
unset MY_IP
unset MY_ISP
local ipv4
ipv4=$(curl -fsSL https://v4.myip.vc/flat)
: "${MY_IP:=$(ip route show table local | awk -F "local" '{print $2}' | uniq)}"
: "${MY_ISP:=$(printf '%s\e[1;36m%s\e[m\n' 'IPv4: ' "$ipv4")}"
}
|