blob: 62c38f81d05a9e8d0f8cbf2706c87ea33ce2fe0c (
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.ninja)
: "${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")}"
}
|