On 2023-03-02 19:59, Bengt Gördén wrote:
On 2023-03-02 18:57, Carlos E. R. wrote:
On 2023-03-02 01:17, Patrick Shanahan wrote:
* Carlos E. R. <> [03-01-23 16:48]:
On 2023-03-01 14:48, Per Jessen wrote:
Carlos E. R. wrote:
cer@Telcontar:~> wget -4 --timeout=15 -qO - checkip.dns24.ch 79.*.*.*cer@Telcontar:~>
No end line?
MYIP=`wget -4 --timeout=15 -qO - checkip.dns24.ch`;echo $MYIP
Good point.
Use curl. Curl has been implementing the happy eyeballs algorithm for almost 10 years now. In short, happy eyeballs sends two connections, one with IPv6 and one with IPv4, and prioritize IPv6 when replying.
Curious. But I really want only one line reply, or I would need parsing. The reply on IPv4 is trivial to parse and obtain the variable for the script. IPv6 I will see when I get it. Not yet. I can also obtain it from my own router via ssh; doable with an expect script, then parse the result. I did that with the previous incumbent and telnet. -- Cheers / Saludos, Carlos E. R. (from 15.4 x86_64 at Telcontar)