aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/tools/network.sh
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2021-02-10 13:52:52 -0500
committerJesús <heckyel@hyperbola.info>2021-02-10 13:52:52 -0500
commit7e95c3b667a1b353f8275db886203f272bfcce34 (patch)
treeaefe3b7db69ac78b83b79a70cf43401679812d20 /hyperterm/tools/network.sh
downloadhyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.tar.lz
hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.tar.xz
hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.zip
first commit
Diffstat (limited to 'hyperterm/tools/network.sh')
-rw-r--r--hyperterm/tools/network.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/hyperterm/tools/network.sh b/hyperterm/tools/network.sh
new file mode 100644
index 0000000..0bab431
--- /dev/null
+++ b/hyperterm/tools/network.sh
@@ -0,0 +1,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}')}"
+}