I would like to log my external IP, i.e. the WAN IP address of the router, on an RPi4 unit, which sits on a mobile broadband connection.
It seems like the external IP address changes frequently so I would like to create a log of the address.
I can do all items in a script except I don't know how to retrieve the address....
If I use this command in a browser I get a response in the browser window:
http://checkip.dyndns.com/
The displayed text in the browser is this:
Current IP Address: 158.174.yyy.xxx
(yyy.xxx are real numbers of course)
Can you advice some way I can use that URL inside a script and extract the IP address response into a variable?