From owner-freebsd-questions@FreeBSD.ORG Sun Nov 9 22:55:22 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBD9F16A4CE for ; Sun, 9 Nov 2003 22:55:22 -0800 (PST) Received: from mindfields.energyhq.es.eu.org (73.Red-213-97-200.pooles.rima-tde.net [213.97.200.73]) by mx1.FreeBSD.org (Postfix) with ESMTP id CAD2643FDF for ; Sun, 9 Nov 2003 22:55:21 -0800 (PST) (envelope-from flynn@energyhq.es.eu.org) Received: from scienide.energyhq.es.eu.org (scienide.energyhq.es.eu.org [192.168.100.1]) by mindfields.energyhq.es.eu.org (Postfix) with SMTP id 5E32635791; Mon, 10 Nov 2003 07:55:20 +0100 (CET) Date: Mon, 10 Nov 2003 07:55:26 +0100 From: Miguel Mendez To: "Zhang Weiwu" Message-Id: <20031110075526.420980e3.flynn@energyhq.es.eu.org> In-Reply-To: References: Organization: X-Mailer: Sylpheed version 0.9.5-gtk2-20030906 (GTK+ 2.2.4; i386-portbld-freebsd5.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: simpliest way to calculate octal? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Nov 2003 06:55:22 -0000 On Mon, 10 Nov 2003 14:35:35 +0800 "Zhang Weiwu" 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 http://www.energyhq.es.eu.org