Hi all,
I have a small script to convert my HexaDecimal Input to Decimal as output.
#!/bin/ksh
hd=00208060
dec=`printf %d $hd`
echo $dec
Output of the above program:
printf: 00208060 not completely converted
16
But my expected output is "2130016".
How can i acheive this.
I... (2 Replies)
Hi,
Can anyone please help me ascci to decimal conversion in bash
I have a file which contains stream of numbers like this,these are ascci values
729711810132973278105991013268971213233
I want to covert it to its actual value like upper code's decimal is
"Have a Nice Day!"
... (15 Replies)
Dear All PROs
Thanks in advance
need a shell for Decimal to hex conversion
input file (decimal values)
65,5,48,66,133,131,118,47
65,5,48,66,133,131,83,63
.
.
desire output should be (Hex value)... (11 Replies)
I have a text file of alphanumeric values listed one by one. I have to convert them to hexadecimal equivalents for each character seperated by ":" in Unix bash shell script. For example, 12345678 has to be converted to 31:32:33:34:35:36:37:38 (10 Replies)
I have searched and the answers I have found thus far have led me to this point, so I feel I am just about there.
I am trying to convert a column of hexadecimal to decimal values so that I can filter out via grep just the data I want. I was able to pull my original 3 character hex value and... (10 Replies)
Hi Guys,
Is it possible to convert the hexadecimal to Binary by unix command.....I could not figure out....
If I need to convert AF6D to binary...what could be the way to do?
Thanks in advance!!
---------- Post updated at 02:57 AM ---------- Previous update was at 02:42 AM ----------
I... (6 Replies)
How can I convert hexadecimal values to Binary from the second field to the end
Input:
WS-2 23 345 235
DT-3 45 4A3 000
pp-2 76 300 E4
Output:
WS-2 100011 1101000101 1000110101
DT-3 1000101 10010100011 000
pp-2 1110110 1100000000 11100100 (16 Replies)
DECHEX(3) 1 DECHEX(3)dechex - Decimal to hexadecimalSYNOPSIS
string dechex (int $number)
DESCRIPTION
Returns a string containing a hexadecimal representation of the given unsigned $number argument.
The largest number that can be converted is PHP_INT_MAX
* 2 + 1 (or -1): on 32-bit platforms, this will be 4294967295 in decimal, which results in dechex(3) returning ffffffff.
PARAMETERS
o $number
- The decimal value to convert. As PHP's integer type is signed, but dechex(3) deals with unsigned integers, negative integers
will be treated as though they were unsigned.
RETURN VALUES
Hexadecimal string representation of $number.
EXAMPLES
Example #1
dechex(3) example
<?php
echo dechex(10) . "
";
echo dechex(47);
?>
The above example will output:
a
2f
Example #2
dechex(3) example with large integers
<?php
// The output below assumes a 32-bit platform.
// Note that the output is the same for all values.
echo dechex(-1)."
";
echo dechex(PHP_INT_MAX * 2 + 1)."
";
echo dechex(pow(2, 32) - 1)."
";
?>
The above example will output:
ffffffff
ffffffff
ffffffff
SEE ALSO hexdec(3), decbin(3), decoct(3), base_convert(3).
PHP Documentation Group DECHEX(3)