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