i want to convert a text file to hex and have written this code :
My problem is to recognise where the line of the original document ends.
The input from text file is :
The output is :
But my desired Output is:
The Strings in the text file are of various length,...but in each line is just one word!
Any ideas how to solve this problem?
Hi everyone!
I was wondering if anyone knows how to change hex code back into ascii.
when i process a form:
" / " turn to " %2F "
" @ " turns to " %40 "
" ' " turns to " %27 "
" ( " turns to " %28 "
" ) " turns to " %29 "
this is my code so far: order.txt
thanks,
primal
p.s.... (1 Reply)
How will I display on screen a UNIX ascii file with its HEX equivalent. I want to check whether 0D 0A is coming at the end of the file which I am generating from UNIX. (1 Reply)
Hi All,
My main intension of is to convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ','
This has to be done for all the hexstring char* is NULL.
Store the result prefixed with "0x" and suffixed with ',' in another char* and pass it to... (1 Reply)
I am writing a bash script to do some parsing on a log and I am running into a problem when it comes to converting only certain sections of the file from hex to ascii or hex to decimal.
Data Example:
The hex values after Hardware and SW Version I need to convert from Hex to ASCII and the... (16 Replies)
Hi All,
I have an ascii file in which few columns are having hex values which i need to convert into ascii. Kindly suggest me what command can be used in unix shell scripting?
Thanks in Advance (2 Replies)
So, I have a folder, containing subdirs like this:
52334d50
52365245
524b4450
524f3350
52533950
52535050
52555550
now I want to go ahead and rename all those folder:
hex -> ascii (8 Replies)
Discussion started by: pasc
8 Replies
LEARN ABOUT DEBIAN
netsds::util::convert
NetSDS::Util::Convert(3pm) User Contributed Perl Documentation NetSDS::Util::Convert(3pm)NAME
NetSDS::Util::Convert - data formats conversion functions
SYNOPSIS
use NetSDS::Util::Convert qw(...);
DESCRIPTION
"NetSDS::Util::Convert" module contains miscelaneous functions.
o CLI parameters processing
o types validation
o HEX, Base64, URI, BCD encondig
o UUID processing
EXPORTED FUNCTIONS
conv_conv_str_bcd($str) - convert string to little-endian BCD
This function converts string to little-endian BCD encoding filled with F16 value.
conv_chr_hex($char) - encode char to hexadecimal string
$hex = conv_chr_hex('a'); # return 61
conv_hex_chr($hex) - convert hexadecimal string to character
$chr = conv_hex_chr('4A'); # return 'J'
conv_str_hex($str) - convert byte string to hexadecimal
$str = 'Want hex dump!';
$hex = conv_hex_str($str);
print "Hex string: " . $hex;
conv_hex_str($string) - convert hex to byte string
$hex = '7A686F7061';
$string = conv_hex_str($hex);
print "String from hex: " . $string;
conv_str_base64($str) - convert string to Base64
my $b64 = str_base64("Hallo, people!");
conv_base64_str($b64) - convert Base64 to string
my $str = base64_str($base64_string);
conv_str_uri($str) - convert string to URI encoded
Example:
my $uri = str_uri("http://www.google.com/?q=what");
conv_uri_str($uri) - decode URI encoded string
Example:
my $str = uri_str($uri_string);
EXAMPLES
None
BUGS
None
TODO
1. Add other encodings support
SEE ALSO
Pod::Usage, Data::UUID
AUTHORS
Valentyn Solomko <pere@pere.org.ua>
Michael Bochkaryov <misha@rattler.kiev.ua>
perl v5.12.4 2011-08-27 NetSDS::Util::Convert(3pm)