Operating System - HP-UX
1831635 Members
1714 Online
110027 Solutions
New Discussion

Re: command line argument for hex to dec conversion

 
SOLVED
Go to solution
boley janowski
Trusted Contributor

command line argument for hex to dec conversion

command line argument for hex to dec conversion
6 REPLIES 6
Bill McNAMARA_1
Honored Contributor

Re: command line argument for hex to dec conversion

I'll have to work on this, but there'd be at least two methods:
1 the bc command
2 awk with a print specified to output in dec

I'll get back to you
(unless someone else does quicker)

If it's not for scripting,
in hex multiply the first digit by 16 and
add the second.! or use the calculator in
CDE if it's anymore complicated..

give us a bit..

Later,
Bill
It works for me (tm)
boley janowski
Trusted Contributor

Re: command line argument for hex to dec conversion

Thanks, I have a script that isolates the hex numbers I want, but I need to be able to incorperate the dec (answere) in a menu for my operators. So yes its for scripting purposes.
Rita C Workman
Honored Contributor
Solution

Re: command line argument for hex to dec conversion

Bill McNAMARA_1
Honored Contributor

Re: command line argument for hex to dec conversion

Bill McNAMARA_1
Honored Contributor

Re: command line argument for hex to dec conversion

snap!!!
It works for me (tm)
boley janowski
Trusted Contributor

Re: command line argument for hex to dec conversion

excellent, thanks for the help i guess i just overlooked that link!!