Skip to content

Instantly share code, notes, and snippets.

@numToStr
Last active May 18, 2020 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save numToStr/1213edb5ce5a2c925de542b55c3cd01a to your computer and use it in GitHub Desktop.
Save numToStr/1213edb5ce5a2c925de542b55c3cd01a to your computer and use it in GitHub Desktop.
#!/bin/bash
set -e
# IP Address Utilities
function ipInternal() {
# echo "Ethernet :: IP => $( ip -4 -o a show wlan1 | awk '{ print $4 }' )"
echo "Wireless :: IP => $( ip -4 -o a show wlo1 | awk '{ print $4 }' )"
}
function ipExternal() {
echo "External :: IP => $( curl --silent https://ifconfig.me )"
}
function ipinfo() {
ipInternal
ipExternal
}
alias myip=ipInternal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment