HP3000-L Archives

October 2009, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Walter J. Murray" <[log in to unmask]>
Reply To:
Walter J. Murray
Date:
Fri, 16 Oct 2009 09:52:40 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (53 lines)
Greetings,

Thanks to all who responded to my query.

One suggestion was to use frombyte(1) to convert the file to a
record-oriented file, then dump it with FCOPY.  I hadn't even tried
that, because I thought the byte stream emulator would get in the way.
But it works just fine, as long as you specify -b to create a binary
output file.  The only inconvenience is that the last [fixed-length]
record is padded with null characters, so you have to look at the EOF of
the byte stream file to know for sure how many of those null characters
are for real, and how many are padding characters.

Several people suggested using od(1) (which I had forgotten about during
the years I've been away from HP-UX), and that turned out to be the best
solution for my needs.  It does everything I needed.

Walter  

-----Original Message-----

2009/10/13 Walter J. Murray <[log in to unmask]>:
> Greetings,
>
> I am looking for a convenient way to dump a byte stream file that
> contains unknown data, data which may not be well behaved.
>
> With a file of fixed or variable length records, I often use something
> like this to see exactly what's there:
>
> FCOPY FROM=MYFILE;TO=;CHAR;HEX;NORECNUM
>
> With a byte stream file, however, the byte stream emulator gets in the
> way.  It insists on presenting the file as a collection of records,
> defined by the new-line character (ASCII 10, or '\n', or <LF>).  This
> may not be convenient if the file contains binary numbers.  Worse yet,
I
> may have a 9000-byte file that doesn't contain any <LF> characters at
> all.
>
> None of the usual tricks, like using MR;NOBUF, seem to work.
>
> I know I can open the file with HPFOPEN and use item 77 to sidestep
the
> emulator.  Does anybody know an easier way?
>
> Walter
>
> Walter J. Murray

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2