Gentoo Archives: gentoo-user

From: Renat Golubchyk <ragermany@×××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Kernel setting for frame buffer (2.6.23-r5)
Date: Wed, 09 Jan 2008 23:04:34
Message-Id: 20080109235738.6c20ecaa@mating-tux
In Reply to: Re: [gentoo-user] Re: Kernel setting for frame buffer (2.6.23-r5) by Etaoin Shrdlu
1 On Wed, 9 Jan 2008 22:17:37 +0100 Etaoin Shrdlu
2 <shrdlu@×××××××××××××.org> wrote:
3 > On Wednesday 9 January 2008, reader@×××××××.com wrote:
4 >
5 > > reader@×××××××.com writes:
6 > > > do you know of a chart that shows the decimal notation like you
7 > > > posted? (Its not in `man vga')
8 > > >
9 > > > And I don't recall where I got that from... where ever it was, it
10 > > > probably also has the decimal equivalents.
11 > >
12 > > You can ignore this request... I found a nifty hex to decimal
13 > > converter for vim here:
14 > > http://vim.wikia.com/wiki/VimTip27
15
16 If you only want to convert one number (or an arithmetic expression) you
17 can write, e.g. ":echo 0x31a" in vim and be done with it. :-)
18
19 >
20 > A perhaps simpler way is to use the bc program (which needs to be
21 > installed for this to work, of course):
22 >
23 > $ echo 'obase=10; ibase=16; 31A' | bc
24 > 794
25
26 Or an even simpler way would be
27
28 $ echo $((0x31a))
29 794
30
31 Bash is really cool. It can understand numbers up to base 64. ;-)
32
33
34 Cheers,
35 Renat
36
37 --
38 Probleme kann man niemals mit derselben Denkweise loesen,
39 durch die sie entstanden sind.
40 (Einstein)

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Re: Kernel setting for frame buffer (2.6.23-r5) Etaoin Shrdlu <shrdlu@×××××××××××××.org>