Created
March 19, 2018 14:29
-
-
Save geekbass/2a95e2896c3a45632629a528cf1eb322 to your computer and use it in GitHub Desktop.
Get the main network interface of a machine. Used to ip-detect in DC/OS.
This file contains hidden or 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 | |
ip route get 8.8.8.8 | awk '{print $7; exit}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment