Still learning over here. I made the below based on what I've learned so far and what I've stolen from others. It updates my dynDNS addresses, both IPv4 and v6. I'm looking to see what I could have done better or how those more experienced than me would have done it. Thanks for your time!
(It wont let me post links cuz I'm still new here so I dropped one of the 't's in the URLs on purpose)
Still learning over here. I made the below based on what I've learned so far and what I've stolen from others. It updates my dynDNS addresses, both IPv4 and v6. I'm looking to see what I could have done better or how those more experienced than me would have done it. Thanks for your time!
(It wont let me post links cuz I'm still new here so I dropped one of the 't's in the URLs on purpose)
I can't speak for the curls but the following gets rid of unecessary greps, sed and cat.
The only problem I have with my solution is what if the output format of ip changes so that your address is no longer in field 4?
is certainly more expensive than
But in the case it is one line, the following works, too:
It would even allow the following two-lines expansion:
And writing the two-lines file would be like
or
or