Re: Is there a tool to convert decimal/octal/hex ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2004-06-01 at 12:58 -0500, Randy Kelsoe wrote:
> clemens@xxxxxxx wrote:
> 
> >I seem to remember that there used to be a tool in Linux to
> >convert between decimal and octal and Hex, but I havent 
> >stumbled over it in my recent search.
> >
> >Anyone know of such a beast?
> >
> In gnome, click on the Fedora Button => Accessories => Calculator. In 
> the calculator, click on  "View" and select 'Scientific Mode'. From a 
> command line, type 'gcalctool'.
> 
> 

or a better command line answer is bc:

Number of seconds since 00:00:00 1970-01-01 UTC in
	1) octal: echo "obase=8;$(date +%s)" | bc -l
	2) decimal: echo "obase=10;$(date +%s)" | bc -l
	3) hex: echo "obase=16;$(date +%s)" | bc -l
	
-- 
Anthony Joseph Seward <anthony.seward@xxxxxxxx>



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux