I am getting my IP address using a curl command, and I want to save it as a shell variable.
I use the following command to get the ip address
curl ipinfo.io/ip
And I assign the variable thusly:
IPADDR=`curl ipinfo.io/ip`
but when I echo this, I get the following:
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 14 100 14 0 0 41 0 --:--:-- --:--:-- --:--:-- 164
24.18.247.198
All I want is 24.18.247.198. Any thoughts?