I have a command that returns the following:
id1="172" id2="17" id3="136" id4="5" id5="0" />
id1="172" id2="17" id3="128" id4="2" id5="0" />
id1="172" id2="17" id3="128" id4="4" id5="0" />
id1="172" id2="17" id3="128" id4="6" id5="0" />
The first four IDs combined represent an IP address (e.g. 172.17.136.5
for the first line).
I would like to pipe the above to a parsing command which will output a single string with all the IP addresses separated by spaces.
For the above example:
myVariable="172.17.136.5 172.17.128.2 172.17.128.4 172.17.128.6"
How can I do this?