A starter idea longhand OSX 10.7.5 default bash terminal.
A pure flat file only as we have no idea of the layout...
ALL values below decimal 32 and above 126 not converted...
Results from you file snippet...
EDIT:
This is a hexdump -C of the file...
Found the sections that newlines could be coded for...
The 4 examples are the length of each ASCII character block and 2 are ascii characters too!
I have not bothered to do the others but just look at the character before each __text__ block.
Last edited by wisecracker; 01-19-2015 at 06:09 PM..
Reason: See above...
This User Gave Thanks to wisecracker For This Post:
Thanks wisecracker, it's wonderful, magic, i would loop the file char by char, but i hadn't the trick for.
I add this to your fabulous code for separate and filter the text:
I thought of using od something like this and filtering out the correct numbers.
(This is a 512 byte test binary file of mine, OSX 10.7.5, default bash terminal.)
Bazza...
Hi wisecracker, i have seen the trick with od and his decimal output, but i prefer the command hexdump (no loop)
thanx for the trick with loop for understanding me the read byte by byte of a binary file.
I have a binary file with all content is text, i want convert this binary to a regular file because i want to parse it.
Thx.
---------- Post updated at 05:01 AM ---------- Previous update was at 04:34 AM ----------
I have found the solution
cat file | tr -d '\0' (8 Replies)
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)
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)
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)
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)
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)
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)
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)