blob: 509a40ddac13666efd786ec20a407168b3a2bd54 (
plain)
1
2
3
4
5
6
7
8
9
|
#!/bin/bash
function __network() {
unset MY_IP
unset MY_ISP
local ipv4
ipv4=$(curl -fsSLk 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")}"
}
|