Here's a Unix/Linux shell script
that works like the Pick XTD verb,
but that doesn't have a 32 bit limit.
 
#!/usr/bin/sh
echo 16 i $1 p | dc

Note: Hex digits A B C D E F
must be entered as UPPER CASE.

"dc" works with integers of 64 bits.

Actually, "dc" works with integers
of thousands of bits, but it gets
a bit slow if you push the limits.

# What "dc" does in this script:
# 16  ... push 16 on the stack
# i   ... use the top of the stack as the input radix
# $1  ... push shell command line arg on the stack
# p   ... pop the stack

Some folks might think the above 2 line
script just isn't cryptic enough,
in which case, you can do it this way:
#!/usr/bin/sh
echo 16i$1p|dc

***


The information contained in this e-mail message may be privileged 
and confidential information and is intended only for the use of 
the individual and/or entity identified in the alias address of 
this message.  If the reader of this message is not the intended 
recipient, or an employee or agent responsible to deliver it to the 
intended recipient, you are hereby requested not to distribute or 
copy this communication. If you have received this communication in 
error, please notify us immediately by telephone or return e-mail and 
delete the original message from your system.
-------
u2-users mailing list
[EMAIL PROTECTED]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to