Re: Bug#534242: ITP: antihex -- Converts hex to decimal

2009-06-23 Thread Thomas Viehmann

Hi,

Harry Rickards wrote:

  Section : math



AntiHex is a pipe to convert hex values into decimal. Ex: # cat
/proc/iomem -0009fbff : System RAM 0009fc00-0009 : reserved
 # cat /proc/iomem | ah -639K-1 : System RAM 639K -640K-1 :
reserved ...


I'm not sure the equivalent of

python -c 'import re,sys ; exec(for l in sys.stdin: \
sys.stdout.write(re.sub(r(?![0-9A-Fa-f])[0-9A-Fa-f]{3,8}(?![0-9A-Fa-f]),\
lambda x: ((lambda y: (y2**30 and (%.2f%(y/2.0**30))+G) or \
(y2**20 and (%.2f%(y/2.0**20))+M) or (y2**10 and \
(%.2f%(y/2.0**10))+K) or str(y))(int(x.group(),16))),l)))'

qualifies as math. And yes, I know that ah is much superior because it 
has the -1 business.


Kind regards

T.
--
Thomas Viehmann, http://thomas.viehmann.net/


--
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#534242: ITP: antihex -- Converts hex to decimal

2009-06-22 Thread Harry Rickards
Package: wnpp
Severity: wishlist
Owner: Harry Rickards hricka...@l33tmyst.com

* Package name: antihex
  Version : 0.02-1
  Upstream Author : Zhaolei zhaole...@hotmail.com
  Maintainer  : Harry Rickards hricka...@l33tmyst.com
* URL : https://sourceforge.net/projects/antihex/
* License : GPL, version 3
  Section : math

AntiHex is a pipe to convert hex values into decimal. Ex: # cat
/proc/iomem -0009fbff : System RAM 0009fc00-0009 : reserved
 # cat /proc/iomem | ah -639K-1 : System RAM 639K -640K-1 :
reserved ...



-- 
To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org