Sponsored Content
Full Discussion: Problem with binary file
Top Forums Shell Programming and Scripting Problem with binary file Post 302932001 by protocomm on Sunday 18th of January 2015 04:51:34 AM
Old 01-18-2015
I'm french, it"s possible that's not clear.

In fact, i have a file ArchivePlay.log from a windows PC, inside the file, there are whole text.
When i do:
Code:
file --mime ArchivePlay.log

it says: binary file

after:
Code:
od -bc ArchivePlay.log

I see a lot of
Code:
\0

If i:
Code:
tr -d '\0' ArchivePlay.log

The binary file become a plain text file, i'm happy

I'm wonder, how do the same thing with python, i try to convert the binary file in ascii file but without success
 

10 More Discussions You Might Find Interesting

1. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

2. Filesystems, Disks and Memory

UNIX problem concerning Microsoft Office Binary

I just started using Terminal on my Mac this summer, and right now I am having problems making a shell script. This shell should run the "Microsoft Setup Assistant" once I run the Automator Script. Alas, I still have problems. Here is the offending scriptlet: Sudo Tcsh root# cd... (2 Replies)
Discussion started by: chrisfrap
2 Replies

3. Solaris

problem when decoding a binary file

I tried to decode a binary script using the command 'uudecode'. but it is giving error as 'No begining line'. 'uudecode -o <outfile name> <binary file>' Please help me in resolving this. (4 Replies)
Discussion started by: vamshikrishnab
4 Replies

4. SCO

SCO unix binary compatibility problem

Hi I am looking for sco xenix binary compatibility utility "cvtomf",(convert omf object to COFF object) Would you please help me ? tnx (3 Replies)
Discussion started by: javad1_maroofi
3 Replies

5. UNIX for Dummies Questions & Answers

Pipe binary file matches grep results to file

I am using grep to match a pattern, but the output is strange. $ grep -r -o "pattern" * Gives me: Binary file foo1 matches Binary file foo2 matches Binary file foo3 matches To find the lines before/after, I then have to use the following on each file: $ strings foo1 | grep -A1 -B1... (0 Replies)
Discussion started by: chipperuga
0 Replies

6. Shell Programming and Scripting

Output redirection of c binary file to a file in shell script is failing

I am struck up with a problem and that is with output redirection. I used all the ways for the redirection of the output of c binary to a file, still it is failing. Here are the different ways which I have used: ./a.out | tee -a /root/tmp.txt 2>&1 ./a.out | tee -a /root/tmp.txt 1>&1 ./a.out |... (2 Replies)
Discussion started by: Maya29988
2 Replies

7. 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

8. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

9. Shell Programming and Scripting

PROBLEM with another binary file

Hello, I want to parse another file, i just want the ascii content, here the result of command od -bc file 0000000 036 000 024 000 000 000 377 376 377 010 060 000 060 000 060 000 036 \0 024 \0 \0 \0 377 376 377 \b 0 \0 0 \0 0 \0 0000020 060 000 062 000 106 000... (21 Replies)
Discussion started by: protocomm
21 Replies

10. Web Development

Problem in printing binary tree using php and mysql

Database Structure Root Table ID Root_ Node Level 1 A 0 2 B 1 3 C 1 Child Table ID Left_Node Right_Node Root_Node Root_ID 1 B C A 1 ... (1 Reply)
Discussion started by: Deepak Tiwari
1 Replies
wnnatod(1)							   User Commands							wnnatod(1)

NAME
wnnatod - Convert an EUC text dictionary to a binary dictionary SYNOPSIS
/usr/bin/wnnatod [-s num] [-R] [-S] [-U] [-r] [-N] [-n] [-P filename] [-p filename] [-I] [-e] [-h filename] binary_dictionary_filename DESCRIPTION
wnnatod reads a Japanese EUC text dictionary from the standard input, converts it to a binary dictionary and writes it to the specified binary_dictionary_filename. OPTIONS
The following options are available. -s num Specifies the amount of memory to allocate (in words). num should be a little over the number of words in the dictionary. Normally you do not need to specify this option. The default is 70,000. If wnnatod fails, notifying memory shortage, retry the command with -s option. -R Converts the EUC text dictionary to a reverse-searchable binary dictionary (default). -S Converts the EUC text dictionary to a fixed-format dictionary. -U Converts the EUC text dictionary to an editable dictionary. -r Reverses the order of Kana and Kanji when converting the EUC text dictionary. -N Sets the dictionary password to "*". -n Sets the frequency password to "*". -P filename Specifies the file name of the dictionary password. -p filename Specifies the file name of the frequency password. -I Creates a system dictionary. -e Registers an entry's reading (Hiragana) as word in the binary dictionary if the reading and the word are the same (that is, the word consists of only Hiragana). With this option, you cannot convert a text dictionary to a reverse-searchable binary dictionary. -h filename Specifies the file name that contains part of speech information. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWjwncu | +-----------------------------+-----------------------------+ SEE ALSO
wnndictutil(1), wnndtoa(1), wnnotow(1), wnntouch(1) SunOS 5.10 2 Mar 1998 wnnatod(1)
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy