CLI magic16 Mar 2016
Today we would like to share some CLI magic. So for example instead of using this long bash spaghetti command:
ip=$(/sbin/ifconfig | grep "inet addr" | grep -v 127.0. | sed -r "s/.*addr:([^ ]+) .*/\1/") - here we want to find all IP addresses on target host.
You can just use this simple and clear basic command:
Check out man page for
hostname command too: hostname