Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Nov 2003 07:55:26 +0100
From:      Miguel Mendez <flynn@energyhq.es.eu.org>
To:        "Zhang Weiwu" <weiwuzhang@hotmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: simpliest way to calculate octal?
Message-ID:  <20031110075526.420980e3.flynn@energyhq.es.eu.org>
In-Reply-To: <Law11-F29PdUmUrrjZs0004f0ed@hotmail.com>
References:  <Law11-F29PdUmUrrjZs0004f0ed@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 10 Nov 2003 14:35:35 +0800
"Zhang Weiwu" <weiwuzhang@hotmail.com> wrote:

Hi,

> Today I found I cannot calculate what is the octal form of 0xa04e.
> 
> First I thought xcalc should do the work, but it seems only deal with 
> decimal.
> 
> I have perl, tcsh, python interprater. It is likely that they are all 
> capable of this kind, but what are the commands for them? What's the most 
> convenient way?

How about: echo 0xa04e | awk '{printf "%o\n",$1}'

Cheers,
-- 
	Miguel Mendez <flynn@energyhq.es.eu.org>
	http://www.energyhq.es.eu.org



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