This is the mail archive of the
mailing list for the Cygwin project.
RE: Cat and Head Problems with Binary Files
- To: email@example.com, firstname.lastname@example.org
- Subject: RE: Cat and Head Problems with Binary Files
- From: Earnie Boyd <email@example.com>
- Date: Thu, 29 Jul 1999 05:08:56 -0700 (PDT)
- Reply-To: firstname.lastname@example.org
--- Jeffry T Ross <email@example.com> wrote:
> I thought the suggestion to use dd was a good, although a bit excessive
> when one only wants to move bytes from a file to a pipe without any
> conversion. So I tried it:
> dd if=test1 > test2
> test1 was 1296 bytes and test2 became 1301 bytes.
> So then I tried dd directly to a file.
> dd if=test1 of=test2
> this worked fine.
> So now I don't suspect cat but the piping and redirection.
> The question is how does cygwin implement it's piping and redirection?
> Is this problem imposed by the underlying WIN/DOS or is it a bug in BASH?
> The pipe shouldn't be trying to interpret the data going through it.
> That's the job of the process at the end of the pipe, be it the terminal
> or another program.
What version of cygwin1.dll are you using? Supply the output of `uname -a' and
I'll know the answer to that.
The stock b20.1 version has a problem with the default behaviors of the
[no]binary switch for the CYGWIN variable. If you don't have at least the Jan
15th snapshot then go to the site or mirror and install that version.
The [no]binmode switch affect the processing mode (text vs binary) for pipes
and redirects. The default is binmode which will pass the \r character through
the pipe and not add the \r character on the redirect. However, the default
binmode and the specified binmode are different in the stock b20.1 version.
This created some interesting results.
Earnie Boyd <mailto:firstname.lastname@example.org>
Newbies, please visit
(If you respond to the list, then please don't cc me)
Do You Yahoo!?
Free instant messaging and more at http://messenger.yahoo.com
Want to unsubscribe from this list?
Send a message to email@example.com