Let's say I have the following example string:
<ETH0_IP><![CDATA[10.0.100.10]]></ETH0_IP>
I would like to extract the first numberand the IP in the following format:
0 10.0.100.10
I do know how to extract the first (sed 's@^[^0-255]*\([0-255]\+\).*@\1@'
) number and IPs (grep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'
), but one at the time and I was wondering if I can achieve it in just one line