Created
May 28, 2020 01:54
-
-
Save yijia2413/43f09e341192292c3fe8bdb62acead02 to your computer and use it in GitHub Desktop.
get ip address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
ip route get 8.8.8.8 | head -1 | awk '{print $7}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment