aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/tools/network.sh
blob: 0bab431680359385e449bb134dfd4a62e3a745e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
# Network
function my_ip() {
    unset MY_IP
    : "${MY_IP:=$(ip route show table local | awk -F "local" '{print $2}' | uniq)}"
}

function my_isp() {
    unset MY_ISP
    : "${MY_ISP:=$(host myip.opendns.com resolver1.opendns.com | grep "myip.opendns.com has" | awk '{print $4}')}"
}