Thanks, it works for conversion. But this does not seem to print line by line. In my file, the string in each line is 19 characters. Also, if i can get the output in a file, it will be more useful
For file, i tried:
Last edited by Franklin52; 06-07-2011 at 06:19 AM..
Reason: Please use code tags
Hi frnds :)
I need a small help...
I have a very long file containing 20 digits decimal number which i want to convert into the corresponding 16 digit hexadecimal values.
File looks like....
11908486672755551741
05446378739602232559
04862605079740156652
.
.
.
I tried the script
for i... (7 Replies)
hi ,
i need a script to convert number into hexadecimal base
for example: 237=>ED
it s very important for me thank you in advance for you help (5 Replies)
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)
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)
The file contains code like the below and need to convert each one into a decimal
00 00 00 04 17 03 06 01
So the output should come as
0 0 0 4 23 3 6 1 (24 Replies)
Hi ,
seq can be 0...128
int windex = seq / 8;
int bindex = seq % 8;
unsigned char bitvalue = '\x01' << (7-bindex) ;
bpv.bitmapvalue = bitvalue;
This is the part of a program to convert decimal to bitmap value of hexadecimal.
I want this to change to convert only to... (1 Reply)
DIGITTOINT(3) BSD Library Functions Manual DIGITTOINT(3)NAME
digittoint, digittoint_l -- convert a numeric character to its integer value
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
int
digittoint(int c);
#include <xlocale.h>
#include <ctype.h>
int
digittoint_l(int c, locale_t loc);
DESCRIPTION
The digittoint() function converts a numeric character to its corresponding integer value. The character can be any decimal digit or hexa-
decimal digit. With hexadecimal characters, the case of the values does not matter.
While the digittoint() function uses the current locale, the digittoint_l() function may be passed a locale directly. See xlocale(3) for more
information.
RETURN VALUES
The digittoint() function always returns an integer from the range of 0 to 15. If the given character was not a digit as defined by
isxdigit(3), the function will return 0.
SEE ALSO ctype(3), isdigit(3), isxdigit(3), xlocale(3)BSD April 6, 2001 BSD