Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting binary file to text file Post 302965029 by dp0b on Friday 22nd of January 2016 11:10:59 AM
Old 01-22-2016
Converting binary file to text file

Hi,

Im wondering how I can convert a binary file to a text file?
I have ran the following command to output which type of binary file coding it is

Code:
od -t x1 -c eHat.data0 | head -20

and that gives me the following output;
Code:
0000000 5c 00 00 00 cd 06 f2 41 00 00 00 c6 00 00 00 c6 \ \0 \0 \0 315 006 362 A \0 \0 \0 306 \0 \0 \0 306
0000020 42 8f 95 c0 19 d5 5a c2 8e 99 1f c1 91 03 94 41 B 217 225 300 031 325 Z 302 216 231 037 301 221 003 224 A
0000040 f7 7e cd 40 c4 cc d2 be 00 00 00 c6 00 00 00 c6 367 ~ 315 @ 304 314 322 276 \0 \0 \0 306 \0 \0 \0 306
0000060 00 00 00 c6 6c d9 91 3e b6 9c 2c 3e 5b 98 63 3e \0 \0 \0 306 l 331 221 > 266 234 , > [ 230 c >
0000100 84 61 c1 3e 29 ec 6d 3e 10 9e 4d 44 00 00 00 c6 204 a 301 > ) 354 m > 020 236 M D \0 \0 \0 306
0000120 00 00 00 c6 e2 c3 79 44 c2 50 b6 43 bd ab 9a 40 \0 \0 \0 306 342 303 y D 302 P 266 C 275 253 232 @
0000140 5c 00 00 00 5c 00 00 00 00 00 00 c6 00 00 00 c6 \ \0 \0 \0 \ \0 \0 \0 \0 \0 \0 306 \0 \0 \0 306
0000160 00 00 00 c6 00 00 00 c6 00 00 00 c6 00 00 00 c6 \0 \0 \0 306 \0 \0 \0 306 \0 \0 \0 306 \0 \0 \0 306
*
0000300 00 00 00 c6 5c 00 00 00 5c 00 00 00 00 00 00 c6 \0 \0 \0 306 \ \0 \0 \0 \ \0 \0 \0 \0 \0 \0 306
0000320 00 00 00 c6 00 00 00 c6 83 08 a8 c2 82 d2 25 c3

Is there a way I can convert this to a text file?
Many thanks!

Moderator's Comments:
Mod Comment edit by bakunin: please use CODE-tags not only for code but also for terminal output and file contents. Thank you.

Last edited by bakunin; 01-22-2016 at 06:57 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Converting a text file to a csv file

I have a text file that is the output of a Netbackup report. The file it generates is just a plain text file with only white space between fields. For example: Date Policy Type Kilobytes Retention 12/5/2005 WinNT Full 18329948 6 Months I... (4 Replies)
Discussion started by: primowalker
4 Replies

2. UNIX for Dummies Questions & Answers

How to convert binary Unix file to text

Hi all, I have a print control file (dflt) for Oracle which is in binary. As I am going to develope an application in Window environment, I would like to reference the dflt file. But it is in binary format and I cannot access it. Anyone can suggest me how to convert the file into text or... (5 Replies)
Discussion started by: user12345
5 Replies

3. Shell Programming and Scripting

Converting a text file to HTML

Hi, I need to convert a text file formatted like this ("tshark -z conv,ip" output) to HTML: ===================================================================================================== IPv4 Conversations Filter:<No Filter> | <- ... (4 Replies)
Discussion started by: ph0enix
4 Replies

4. Shell Programming and Scripting

convert binary file into text file

im looking for anothr way to convert binary file into text file im using old solaris version (exatcly like xxd -r) thanks (2 Replies)
Discussion started by: modcan
2 Replies

5. UNIX for Dummies Questions & Answers

Converting binary file to readable format in Ksh

In Unix/Ksh, when I try to look inside a file it says that the file may be a binary file and if I want to see it anyway. When i say 'yes', it shows me the content filled with unreadable symbols (looks like binary). Is there a command that I can run from the Unix prompt to convert/translate that... (3 Replies)
Discussion started by: arthurs
3 Replies

6. Shell Programming and Scripting

Converting columns of a text file.

Not sure the most effient way to do this. I have figiured out how to extract columns with shell script, but not sure how to convert This is what I have... NEWDNS 04-Jun-2011 06:00:59.762 10.220.136.217 crl.verisign.com This is what I need.... Change date, remove mil seconds,... (1 Reply)
Discussion started by: mrlayance
1 Replies

7. UNIX for Dummies Questions & Answers

Converting a text file with irregular spacing into a space delimited text file?

I have a text file with irregular spacing between values which makes it really difficult to manipulate. Is there an easy way to convert it into a space delimited text file so that all the spaces, double spaces, triple spaces, tabs between numbers are converted into spaces. The file looks like this:... (5 Replies)
Discussion started by: evelibertine
5 Replies

8. UNIX for Dummies Questions & Answers

[AIX] Binary file warning for text file.

Hello guys, We had to move from a DC to another, and we are now facing an "issue" with some text files. Looks like that some of our log files are set as binary: file TuxConnectorURA.20121012 TuxConnectorURA.20121012: data or International Language text less TuxConnectorURA.20121012... (2 Replies)
Discussion started by: EnioMarques
2 Replies

9. Shell Programming and Scripting

Converting text file in a matrix

Hi All, I do have a file with many lines (rows) and it is space delimited. For example: I have a file named SR345_pl.txt. If I open it in an editor, it looks like this: adfr A2 0.9345 dtgr/2 A2 0.876 fgh/3 A2 023.76 fghe/4 A2 2345 bnhy/1 A3 3456 bhy A3 0.9876 phy A5 0.987 kdrt A5... (9 Replies)
Discussion started by: Lucky Ali
9 Replies

10. Shell Programming and Scripting

Converting a binary file to ascii and vice versa?

Hi All, I have a binary file which is being exported from a Database, and i need to convert that to ASCII format. How can i achieve that? And this solution should work for any file which is given to us; means they will give different files from different tables. Thanks in advance. (8 Replies)
Discussion started by: baranisachin
8 Replies
CATOD(1)						      General Commands Manual							  CATOD(1)

NAME
catod - To convert the text format of a dictionary to binary format. SYNOPSIS
catod [-s maxword ] [-R] [-r] [-e] [-S] [-U] [-P dicpasswd ] [-p frepasswd ] [-h cixingfile ] outfilename DEFAULT PATH
/usr/local/bin/cWnn4/catod DESCRIPTION
This command converts a dictionary from text format into binary format. outfilename is the name of the binary format dictionary. If outfilename is not given, the output will be passed to the standard output device(stdout). The input file may be piped in by using the "<" command. For example, catod basic.dic < basic.u "basic.dic" here is the output binary format dictionary, while the "basic.u" is the input text format dictionary. If the input text dictionary is not given, the input will be taken from the standard input(stdin). To end the input via standard input, press ^D. OPTIONS
-s maxword To specify the maximum number of words. Default is 70000. -R To create a dictionary for both forward and reverse conversion. (Default). -r To create a reverse format dictionary only for reverse conversion. -e If the Hanzi inside the text dictionary contains characters such as space and tab, they will be compacted to special format. (Default). -S To create a static dictionary. -U To create a dynamic dictionary. -P dicpasswd To specify the password for the dictionary. If "-N" is used instead, the password of the dictionary will be set to "*". -p frepasswd To specify the password for the usage frequency file. If "-n" is used instead, the password of the frequency file will be set to "*". -h cixingfile To specify the Cixing definition file. NOTE
1. The parts in [ ] are options. They may be omitted. 2. The Pinyin and Zhuyin dictionary has the same format. 3. For details of the dictionary structure, refer to cWnn manual. 13 May 1992 CATOD(1)
All times are GMT -4. The time now is 12:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy