This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: cat and binary files
- To: Tim Iverson <iverson at cisco dot com>
- Subject: Re: cat and binary files
- From: Ed Huott <huott at pinebush dot com>
- Date: Thu, 10 Apr 1997 13:34:04 -0400
- cc: marc at watson dot ibm dot com, gnu-win32 at cygnus dot com
In message <199704100238.TAA21049@rottweiler.cisco.com>, Tim Iverson writes:
>If cat is stopping at Ctl-Z on anything but console input, it is a bug.
>There has been no actual "end-of-file" marker in DOS since version 2.0.
>The Ctl-Z is only EOF for the *console*, just like Ctl-D is EOF for
>/dev/tty under Unix. And, like /dev/tty, it's only EOF when the console is
>in cooked mode. If you put the console into raw mode, Ctl-Z does nothing.
>
>Some DOS programs have yet to alter their behavior and still place Ctl-Z at
>the end of disk files. This is also a bug, though if you want to support
>DOS 1.0, you could call it a feature.
>
>All this aside, IMHO, cat is inherently a binary program -- it shouldn't
>care whether newline is CR, LF, or CR+LF unless one of the line-based
>options is used (bns).
>
>BTW, I wouldn't recommend using binary mode. I tried that briefly and
>found that rebuilding will fail rather miserably.
>
The relative merits of text vs. binary mode have all been discussed on
this list before in some excruciating detail. I would suggest
perusing the mailing list archives to anyone new who is interested in
the subject. I do not wish to rekindle that thread here.
<ED>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".