* Convert binary to ascii
@ 1998-05-12 4:00 c-willden
1998-05-14 4:00 ` Bob Harris
0 siblings, 1 reply; 2+ messages in thread
From: c-willden @ 1998-05-12 4:00 UTC (permalink / raw)
I would like an ascii dump of a binary file. I do
not need to maintain the integrity of the file, I just want to be able to read
it. I did strings, but I'm not sure that I got the entire file. Also, I
don't want all the numerical output that vmses dump command gives me (I don't
use vms very much, so maybe the dump command would have given me what I
wanted.)
This is on a Digital Unix 4.0 system.
Thanks;
Sherman Willden
c-willden@mail.dec.com
Colorado Phone Number: 709-592-7102
The beginning of the binary dump looks like this:
M-hF^C^O^C^A^C^E^GM-MM-D,alpha^Ag^A^D^A^^^GM-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^
?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?
M-^?M-^?M-^?M-^?M-^?M-^?M-^?K^^^G^GAkM-^?^AM-~^A^A("{^L^D^CM-^\^A^Q^C^Y^D^^^G
^A^EM-^IM-$M-B^TM-z%~<^M-hG^C^O^C^A^C^E|M-MM-D,alpha^Ag^A^D^A^^^GM-^?M-^?M-^?M
-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?
M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?M-^?K^^^G@kM-^?^AM-~^A^A("{^L^
D^CM-^\^A^Q^C^Y^D^^^G
^A^EM-^IM-$M-B^TM-z%~<^@^AH^C^O^C^A^C^EaM-E,alpha^AM-IM-^?M-^?M-^?M-^?M-^?M-^?
^BbM-^@^BALPHA HSC000 ^LM-^?^A
^XHSC V600^^M-^?^^M-^?HS70M-3!(M-^B"(M-^B"(M-^Bb^T^E^W^A@EHSC000
^DE^A^X^BM-^WTAPE-E Seq 23. at 20-Oct-1993 04:09
:37.70, Out-of-band 000505
Tape unit number 24. connected to Requestor 2. Port 0.
Went Offline without request
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Convert binary to ascii
1998-05-12 4:00 Convert binary to ascii c-willden
@ 1998-05-14 4:00 ` Bob Harris
0 siblings, 0 replies; 2+ messages in thread
From: Bob Harris @ 1998-05-14 4:00 UTC (permalink / raw)
In article <6j9ukg$c3l$1@nnrp1.dejanews.com>, c-willden@mail.dec.com wrote:
>I would like an ascii dump of a binary file. I do
>not need to maintain the integrity of the file, I just want to be able to read
>it. I did strings, but I'm not sure that I got the entire file. Also, I
>don't want all the numerical output that vmses dump command gives me (I don't
>use vms very much, so maybe the dump command would have given me what I
>wanted.)
Sounds like you want something cheap and dirty. Try
tr -c '[:print:]' '.' <binary_file >ascii_dump
The -c option tells 'tr' to select the characters that do not match the
first string. The first string '[:print:]' specifies all printable
characters, so all non-printable characters will be selected. The second
string tells 'tr' to replace selected characters with a period (you may use
any replacement character you like - such as a space ' '). 'tr' reads
stdin and writes to stdout so you have to use I/O redirection to get it to
read your binary file.
Give it a try. If it is not what you want them maybe reading the man page
on 'tr' will give you some other ideas.
--
To get random signatures put text files into a folder called �Random
Signatures� into your Preferences folder.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1998-05-14 4:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-05-12 4:00 Convert binary to ascii c-willden
1998-05-14 4:00 ` Bob Harris
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox