I tried to find out sed, and the examples I found here are for exchanging dates from 05082012 to 20120805, and it's hard for me to adapt them to my current need.
I need to convert the IP address 10.4.13.22 to reverse lookup 22.13.4.10 for an nsupdate script. My biggest problem is that sometimes every octet can change length, for example. 10.4.13.2 and 10.19.8.126
Thanks for any help!
echo 10.0.2.99 | sed 's/\(....\)\(....\)/\2\1/'
This is currently what I tried, just based on another question here, but as the examples do not give much explanation as to what .... means that Im not understanding what he is doing.
This is the result of this command .2.910.09, and I expect 99.2.0.10
Directly, I want to reorder each "section" that is separated by the "."
source share