Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Converting binary file to text file Post 302965040 by RudiC on Friday 22nd of January 2016 12:36:42 PM
Old 01-22-2016
I'm afraid above is NOT the binary representation of a well-formed text file (many zero bytes, mal-formed multibyte chars, malformed single byte chars, ...).
While
Code:
awk '{for(i=2; i<=NF; i++) printf "%c", 0+sprintf ("%d", "0x"$i)}' file
Col1 Col2 Col3 Col4
ABC 00000001 15-Dec-15 13000
ABC 00000001 31-Jan-16 13500
.
.
.

would reconstruct an ASCII file, the result of it applied to every other line of your file yields
Code:
\��A��B��ZŽ����A�~�@��Ҿ���lّ>��,>[�c>�a�>)�m>�MD����yD�P�C���@\\������c

A few chars are recognizable ("\", "A", "B", etc), but the main part is garbage.
 

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
DPBINDIC(1)						      General Commands Manual						       DPBINDIC(1)

NAME
dpbindic - Convert a binary-form dictionary into a text-form dictionary SYNOPSYS
dpbindic [ -xiu [ frequency ] ] binary-file [ text-file ] DESCRIPTION
dpbindic outputs the file information of the binary-form dictionary file specified in binary-file . At this time, the word information of the dictionary can be output in text form to the standard output. To do so, use test-file to specify the text-form dictionary used as the source of binary-form dictionary file. If this specification is omitted, the text dictionary file information in the binary dictionary file will be output. The standard grammar file name is /usr/local/canna/lib/dic/hyoujun.gram. It will be used if the grammar file name specification is omitted. The output format of word information data is specified using an option. OPTIONS
-x Outputs the data without using omission symbol @, which is used when the initial word represents the reading. -i Replaces the reading and word for output. -u Outputs the candidates used in conversion. Outputs all candidates having frequency or more. If frequency is omitted, all candi- dates having frequency 1 will be output. EXAMPLES
(1) If the text-form dictionary file name is omitted: %dibindic iroha.cbd (Text dictionary file name = Directory size + Word size, packed) iroha.swd = 2985 + 5306 pak a4 iroha.mwd = 36276 + 113139 pak a4 (2) If the text-form dictionary file name iroha.mwd is specified: %dpbindic iroha.cbd iroha.mwd (Text dictionary file name = Directory size + Word size, packed) iroha.mwd = 36276 + 113139 pak a4 SEE ALSO
mkbindic(1), dicar(1) DPBINDIC(1)
All times are GMT -4. The time now is 05:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy