Sponsored Content
Top Forums Shell Programming and Scripting PROBLEM with another binary file Post 302934016 by wisecracker on Wednesday 4th of February 2015 02:40:50 AM
Old 02-04-2015
Hi Chubler_XL...
(OSX 10.7.5, default bash terminal.)
Good morning all...
Using your newer code it still has a FF, (Form Feed), character. Effectively this is a page of whitespaces. ;o)
Code:
Last login: Wed Feb  4 07:34:09 on ttys000
AMIGA:barrywalker~> cd Desktop/Code/Shell
AMIGA:barrywalker~/Desktop/Code/Shell> strings -n 1 binary.bin | LC_CTYPE=C tr -d '\n' > text.txt
AMIGA:barrywalker~/Desktop/Code/Shell> cat text.txt
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
                !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~AMIGA:barrywalker~/Desktop/Code/Shell> 
AMIGA:barrywalker~/Desktop/Code/Shell> hexdump -C text.txt
00000000  0c 20 21 22 23 24 25 26  27 28 29 2a 2b 2c 2d 2e  |. !"#$%&'()*+,-.|
00000010  2f 30 31 32 33 34 35 36  37 38 39 3a 3b 3c 3d 3e  |/0123456789:;<=>|
00000020  3f 40 41 42 43 44 45 46  47 48 49 4a 4b 4c 4d 4e  |?@ABCDEFGHIJKLMN|
00000030  4f 50 51 52 53 54 55 56  57 58 59 5a 5b 5c 5d 5e  |OPQRSTUVWXYZ[\]^|
00000040  5f 60 61 62 63 64 65 66  67 68 69 6a 6b 6c 6d 6e  |_`abcdefghijklmn|
00000050  6f 70 71 72 73 74 75 76  77 78 79 7a 7b 7c 7d 7e  |opqrstuvwxyz{|}~|
00000060  0c 20 21 22 23 24 25 26  27 28 29 2a 2b 2c 2d 2e  |. !"#$%&'()*+,-.|
00000070  2f 30 31 32 33 34 35 36  37 38 39 3a 3b 3c 3d 3e  |/0123456789:;<=>|
00000080  3f 40 41 42 43 44 45 46  47 48 49 4a 4b 4c 4d 4e  |?@ABCDEFGHIJKLMN|
00000090  4f 50 51 52 53 54 55 56  57 58 59 5a 5b 5c 5d 5e  |OPQRSTUVWXYZ[\]^|
000000a0  5f 60 61 62 63 64 65 66  67 68 69 6a 6b 6c 6d 6e  |_`abcdefghijklmn|
000000b0  6f 70 71 72 73 74 75 76  77 78 79 7a 7b 7c 7d 7e  |opqrstuvwxyz{|}~|
000000c0
AMIGA:barrywalker~/Desktop/Code/Shell> _

 

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 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)
Discussion started by: protocomm
8 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
PAPS(1) 						      General Commands Manual							   PAPS(1)

NAME
paps - UTF-8 to PostScript converter using Pango SYNOPSIS
paps [options] files... DESCRIPTION
paps reads a UTF-8 encoded file and generates a PostScript language rendering of the file. The rendering is done by creating outline curves through the pango ft2 backend. OPTIONS
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. --landscape Landscape output. Default is portrait. --columns=cl Number of columns output. Default is 1. --font=desc Set the font description. Default is Monospace 12. --rtl Do rtl layout. --paper ps Choose paper size. Known paper sizes are legal, letter, a4. Default is A4. --bottom-margin=bm Set bottom margin in postscript points (1/72 inch). Default is 36. --top-margin=tm Set top margin. Default is 36. --left-margin=lm Set left margin. Default is 36. --right-margin=rm Set right margin. Default is 36. --help Show summary of options. --header Draw page header for each page. --markup Interpret the text as pango markup. --encoding=ENCODING Assume the documentation encoding is ENCODING. --lpi Set the lines per inch. This determines the line spacing. --cpi Set the characters per inch. This is an alternative method of specifying the font size. --stretch-chars Indicates that characters should be stretched in the y-direction to fill up their vertical space. This is similar to the texttops behaviour. AUTHOR
paps was written by Dov Grobgeld <dov.grobgeld@gmail.com>. This manual page was written by Lior Kaplan <kaplan@debian.org>, for the Debian project (but may be used by others). April 17, 2006 PAPS(1)
All times are GMT -4. The time now is 10:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy