convert hex to ascii text


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers convert hex to ascii text
# 1  
Old 04-15-2003
convert hex to ascii text

Is there a command to convert hex characters into their respective ascii values?
# 2  
Old 04-15-2003
I'm not sure if you're trying to convert a file or just individual characters, but if it's a file, check out this link:

https://www.unix.com/programming/3285-converting-hex-ascii.html?s=
# 3  
Old 04-15-2003
I should have been clearer in my post. I was looking to convert individual characters. I searched on google and was able to come up with an extended ascii chart. For anyone who is interested:
http://www.cdrummond.qc.ca/cegep/inf...iles/ascii.htm
# 4  
Old 04-15-2003
If you just want a table to visually look at, try:
man ascii
# 5  
Old 04-16-2003
I had tried man ascii command, but it did not include extended ascii characters. I ended up finding it through google.
# 6  
Old 04-16-2003
I think you could write a short script in Perl. I don't have access to a machine running Perl, so I can't test this, but you may be able to do something like:

#!/usr/local/bin/perl
my @hexList = qw(41 42 43 31 32 33);
$foo = pack("H6",@hexList);
print "$foo\n";
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Convert "hex" foldername to "ascii"

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

2. Shell Programming and Scripting

Convert Hex to Ascii in a Ascii file

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)
Discussion started by: HemaV
2 Replies

3. Homework & Coursework Questions

Convert ASCII Text, with CRLF

1. The problem statement, all variables and given/known data: write a script asciiFix.sh that takes an arbitrary number of file paths from the command line and carries out the same analysis on each one. If a file is not Windows ASCII, your script should do nothing to it. For each file that is... (7 Replies)
Discussion started by: kwatt019
7 Replies

4. Shell Programming and Scripting

Converting hex to ascii/decimal

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)
Discussion started by: Shiftkey
16 Replies

5. Programming

ascii to hex

Hello guys, i want to convert a text file to hex and have written this code : int main(int argc, char **argv) { ifstream file; string fileName = "CODEZ"; file.open(fileName.c_str()); // oeffen im Text-Modus if(file) {... (5 Replies)
Discussion started by: Kingbruce
5 Replies

6. Shell Programming and Scripting

convert ascii values into ascii characters

Hi gurus, I have a file in unix with ascii values. I need to convert all the ascii values in the file to ascii characters. File contains nearly 20000 records with ascii values. (10 Replies)
Discussion started by: sandeeppvk
10 Replies

7. Programming

converaion ASCII to HEX

anyone knows any formulae or flow chart or procedure to convert ASCII characters into HEXA values... (4 Replies)
Discussion started by: Thippeswamy
4 Replies

8. Linux

source code ASCII to HEx

Is there are any source code in ANSI C to convert ASCII to Hexa decimal. (1 Reply)
Discussion started by: Thippeswamy
1 Replies

9. UNIX for Dummies Questions & Answers

Ascii To Hex

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)
Discussion started by: augustinep
1 Replies

10. Programming

converting hex to ascii

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)
Discussion started by: primal
1 Replies
Login or Register to Ask a Question