On Sun, Jul 03, 2005 at 12:14:05PM -0400, fbsd_user wrote: > >many ways, here's one: > > > >printf '10.0.10.5' | sed 's/\.//g' > > > >Arno > > ***************************************** > > Thanks but I need a little more help. > > num_ip="(printf $raw_ip | sed 's/\.//g')" > > gives me a error. > > What would the correct syntax be?
Use backtics: num_ip=`echo $raw_ip | sed 's/\.//g'` Note that when you do this, more that one IP address can end up as the same num_ip, e.g. 11.0.1.50 and 1.10.1.50. Roland -- R.F.Smith (http://www.xs4all.nl/~rsmith/) Please send e-mail as plain text. public key: http://www.xs4all.nl/~rsmith/pubkey.txt
pgpuorOMrgxpE.pgp
Description: PGP signature