I\'m trying to use just the IP address (inet) as a parameter in a script I wrote.
Is there an easy way in a unix terminal to get just the IP address, rather than loo
If you have limited environment, you may use this command:
ip -4 addr show dev eth0 | grep inet | tr -s " " | cut -d" " -f3 | head -n 1