Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jun 2001 23:10:12 -0500
From:      Mike Meyer <mwm@mired.org>
To:        tyler spivey <tspivey8@home.com>
Cc:        questions@freebsd.org
Subject:   Re: program to convert hex to decimal or vise versa?
Message-ID:  <15157.26660.156190.806500@guru.mired.org>
In-Reply-To: <100013324@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
tyler spivey <tspivey8@home.com> types:
> is their a program in ports that i can use
> to convert hex to dec or vv? i don't use x
> and want a command line based app.

Ports nothing. bc is in the base system. I've added prompts for
clarity, as it doesn't prompt.

guru$ bc
bc 1.06
Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'. 
> ibase = 16
> 1A
26
> BCDE
48350
> F
15
> obase = 2
> 1F
11111

The gnu version no longer has the ability to deal with bases < 2, but
those are more amusing than useful.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15157.26660.156190.806500>