Gentoo Archives: gentoo-user

From: Michael Orlitzky <mjo@g.o>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: OT scripting - strip zero if between period and digit
Date: Wed, 23 Jan 2019 21:04:40
Message-Id: 37f56f8a-0d7f-4679-249c-c840e03a3ae3@gentoo.org
In Reply to: Re: [gentoo-user] Re: OT scripting - strip zero if between period and digit by Alexander Kapshuk
1 On 1/23/19 3:08 PM, Alexander Kapshuk wrote:
2 >
3 > The OP stated that there were no leading zeros in the first octet of
4 > the IP address, so that case did not need to be handled.
5 >
6
7 $ echo "1.00.3.4" | sed -r 's/\.0+([^.0]+)/.\1/g'
8 1.00.3.4