Date: Sun, 3 Jul 2005 18:29:31 +0200 From: Roland Smith <rsmith@xs4all.nl> To: fbsd_user <fbsd_user@a1poweruser.com> Cc: "freebsd-questions@FreeBSD. ORG" <freebsd-questions@freebsd.org> Subject: Re: help with sh script Message-ID: <20050703162931.GA5598@slackbox.xs4all.nl> In-Reply-To: <MIEPLLIBMLEEABPDBIEGIEBIHIAA.fbsd_user@a1poweruser.com> References: <6BD492A9-2A38-49C8-B0E2-507F1B9964B2@amadeus.demon.nl> <MIEPLLIBMLEEABPDBIEGIEBIHIAA.fbsd_user@a1poweruser.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] 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 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFCyBJrEnfvsMMhpyURAnETAJ9TSHjVbMa/Aspl7AcywPr87aE0DgCgjIgf umkfb9BrKExkKZZl7drSb1k= =/g4K -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050703162931.GA5598>
