On 1/23/19 3:08 PM, Alexander Kapshuk wrote:
The OP stated that there were no leading zeros in the first octet of the IP address, so that case did not need to be handled.
$ echo "1.00.3.4" | sed -r 's/\.0+([^.0]+)/.\1/g' 1.00.3.4
On 1/23/19 3:08 PM, Alexander Kapshuk wrote:
The OP stated that there were no leading zeros in the first octet of the IP address, so that case did not need to be handled.
$ echo "1.00.3.4" | sed -r 's/\.0+([^.0]+)/.\1/g' 1.00.3.4