Last active
May 5, 2016 18:49
-
-
Save greenbicycle/a5c713932f7fcb3ddc2e to your computer and use it in GitHub Desktop.
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 | |
| # This will get the private networking address from a Digital Ocean droplet | |
| # ifconfig | grep -C 1 eth1 | grep inet | awk -F' ' '{ print $2 }' | awk -F: '{ print $2 }' | |
| # This will show all the ip addresses for this droplet | |
| ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment