Last active
August 29, 2015 14:04
-
-
Save hotienvu/e5e0f37db66952dcbef4 to your computer and use it in GitHub Desktop.
Get Ip address and hostname of the current host
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
echo "$(ifconfig eth0|grep "inet add"|awk -F\: '{print $2}'|awk '{print $1}')" "$(hostname)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment