[Chicago-talk] Removing "." from a string?
arodland at comcast.net
Thu Jan 31 10:00:14 PST 2008
On Thursday 31 January 2008 09:31:05 am John Kristoff wrote:
> On Thu, 31 Jan 2008 07:13:43 -0800 (PST)
> Richard Reina <richard at rushlogistics.com> wrote:
> > Does anyone know an easy way to remove "."s from a string like
> > 192.168.2.16
> > so I get 192168216? Substring seems cumbersome and does not account for
> > length between dots.
> echo 192.168.2.16 | perl -pe 's/\.//g'
Bah, kids these days... haven't been tought not to use s/// when tr/// will
perl -pe 'y/.//d'
Note: kidding, really... but it had to be said ;)
More information about the Chicago-talk