I’m trying to write a ddns update script that deals with ip addresses. I need to store into a local variable the ipaddress from the output of the ping command like
/ping google.com count=1
SEQ HOST SIZE TTL TIME STATUS
0 216.58.204.142 56 113 45ms
sent=1 received=1 packet-loss=0% min-rtt=45ms avg-rtt=45ms max-rtt=45ms
I understand that the script should look something like
:local ipaddress [/ping google.com count=1]
but I’m newbie and I don;t know how to parse the output into a variable.
Help will be very much appreciated.