Subject: Re: using cat on binary files (CTRL-Z trauma)
From: [email-masked] ("Scott R. Sewall")

29 Oct 1996 23:03:06 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 3.0 (WinNT; I)
Original-To: "J.J.Farrell" <[email-masked]>
Original-CC: Henrik Geleff <[email-masked]>, [email-masked]
Original-Sender: [email-masked]

J.J.Farrell wrote:
> 
> > From: "Henrik Geleff" <[email-masked]>
> > Date: Mon, 28 Oct 1996 17:49:44 +0200
> >
> > I do think it is correct for cat to pick CTRL-Z as an end of file on the
> > DOS/Windows/NT platforms, the CTRL-Z has been inherited by these platforms
> > from CP/M, which was not able to determine how much of the last sector
> > actually was file contents. Basicly:
> >
> > - cat was intended to show text files -- cat'ing binary files to an ASCII
> > terminal can bring the terminal into a state which you can not escape from
> > in an orderly manner (i.e. logging out).
> 
> Could you present some evidence that cat was intended to show text
> files, please. I had always understood that its purpose was to
> catenate named files together and write the result to its stdout;
> it was intended to send data down a pipeline of programs which
> would process it, or to send them down a physical line to a printer.
> I believe that the fact that it can display files to a terminal is
> a coincidental result of the UNIX design philosophy.
> 
- snip - snip -

I can't resist, this thread is too good!

The man page for cat from SunOS 5.4 says:

     cat -- concatonate and display files.

it suggests that cat can be used for displaying files, but
not necessarily text files, since that concept doesn't
exist with Unix.

-- Scott
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".