Skip to content

Instantly share code, notes, and snippets.

@stondo
Created April 18, 2016 16:35
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 stondo/de8cd1c77b2c979cbec063abe0cb2e26 to your computer and use it in GitHub Desktop.
Save stondo/de8cd1c77b2c979cbec063abe0cb2e26 to your computer and use it in GitHub Desktop.
#!/bin/bash
ifconfig eth0 | grep "inet addr" | cut -d: -f2 | awk '{print $1}'
@stondo
Copy link
Author

stondo commented Apr 18, 2016

bash script to quickly get public IP of your servers.
(Remember to change your interface name to match your setup)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment