From owner-freebsd-current Mon Mar 13 7:13:40 2000 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 1C3C937B5B5 for ; Mon, 13 Mar 2000 07:13:36 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id KAA35922; Mon, 13 Mar 2000 10:13:31 -0500 (EST) (envelope-from wollman) Date: Mon, 13 Mar 2000 10:13:31 -0500 (EST) From: Garrett Wollman Message-Id: <200003131513.KAA35922@khavrinen.lcs.mit.edu> To: Yoshinobu Inoue Cc: freebsd-current@FreeBSD.ORG Subject: Re: IPv6 setup... In-Reply-To: <20000313102208Z.shin@nd.net.fujitsu.co.jp> References: <38CBD80F.922815CE@newsguy.com> <20000313102208Z.shin@nd.net.fujitsu.co.jp> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > echo 24.113.25.85 | sed -e s/"\."/" "/g | awk '{$5 = $1*256 + $2; $6 = $3*256 + $4; printf "2002:%x:%x:\n", $5, $6}' Or, without only one extra process: myaddr=24.113.25.85 OIFS="$IFS" IFS=".$IFS" set $myaddr IFS="$OIFS" printf "2002:%x:%x:\n" $(($1 * 256 + $2)) $(($3 * 256 + $4)) -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message