[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: command or script for converting hex values to text



At 9:35 AM +0200 9/22/06, Mogens Kjaer wrote:
ankush grover wrote:
 > hey friends,
 >
 > Is there any command on linux which converts the hexadecimal values to
 > text.

What do you mean by "text"?

I have the following aliases:

alias calc 'gawk "BEGIN{ print \!* }"'
alias hcalc 'gawk -v CONVFMT="%x\n" "BEGIN{printf CONVFMT, \!* }"'

FWIW, in bash:

function calc() { gawk "BEGIN{ print $* }"; }
function hcalc() { gawk -v CONVFMT="%x\n" "BEGIN{printf CONVFMT, $* }"; }

(Assuming that I retyped it correctly.)
--
____________________________________________________________________
TonyN.:'                       <mailto:tonynelson georgeanelson com>
      '                              <http://www.georgeanelson.com/>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]