You are not logged in.

#1 15 Mar 2007 17:40

bluesxman
Member
From: UK
Registered: 29 Dec 2006
Posts: 1,129

DEC to HEX ... any suggestions?

For reasons I shan't bore you with, I need to find a self-contained way to convert an IP address into it's HEX equivalent.  Going the other way is as easy as "set /a x=0x000007B" ... but I'm getting a head ache thinking about it.  Some bitwise AND usage to get to binary, then jack with that to get it to spit out the HEX is all I can think of at the moment.

Anybody got any better ideas?  Or already written such a script that I can rip off^H^H^H^H^H^H^H make use of?

TIA

~bxm

Last edited by bluesxman (15 Mar 2007 17:45)


cmd | *sh | ruby | chef

Offline

#2 16 Mar 2007 14:57

Simon Sheppard
Admin
Registered: 27 Aug 2005
Posts: 1,130
Website

Re: DEC to HEX ... any suggestions?

This newsgroup posting from Clay Calvert should help:
http://groups.google.co.uk/group/alt.ms … 716554321a

Offline

Board footer

Powered by