Created
March 5, 2017 06:00
-
-
Save ylt6/05be64ee405390afc96491ca270ea347 to your computer and use it in GitHub Desktop.
Print host IP on linux server
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
ifconfig eth0 | grep 'inet addr:' | awk -F'inet addr:' '{ print $2}' | awk '{ print $1}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment