Gentoo Archives: gentoo-user

From: Grant Edwards <grant.b.edwards@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: OT scripting - strip zero if between period and digit
Date: Wed, 23 Jan 2019 14:10:06
Message-Id: q29sj9$22lf$1@ciao.gmane.org
In Reply to: Re: [gentoo-user] OT scripting - strip zero if between period and digit by Alexander Kapshuk
1 On 2019-01-23, Alexander Kapshuk <alexander.kapshuk@×××××.com> wrote:
2 >
3 > How about this one?
4 >
5 > echo '198.088.0.01
6 > 198.088.062.01' | sed 's/\.0\([0-9][0-9]*\)/.\1/g'
7 > 198.88.0.1
8 > 198.88.62.1
9
10 Also no.
11
12 $ echo 198.088.0.001 | sed 's/\.0\([0-9][0-9]*\)/.\1/g'
13 198.88.0.01
14
15
16 --
17 Grant Edwards grant.b.edwards Yow! Hello. Just walk
18 at along and try NOT to think
19 gmail.com about your INTESTINES being
20 almost FORTY YARDS LONG!!

Replies

Subject Author
Re: [gentoo-user] Re: OT scripting - strip zero if between period and digit Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] Re: OT scripting - strip zero if between period and digit Alexander Kapshuk <alexander.kapshuk@×××××.com>