delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/06/21/19:52:56

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 22 Jun 2001 01:01:35 +0200
From: Christopher Day <Christopher DOT Day AT cern DOT ch>
Message-Id: <200106212301.BAA11995@lxplus014.cern.ch>
To: cygwin AT cygwin DOT com
Subject: textmode, Win2k and Cygwin 1.3.2

I'm totally confused. I have Cygwin 1.3.2 installed on Windows 2000 Pro, Service Pack 2. Cygwin's "mount" tells me that I have my working directory mounted in textmode. The Cygwin documentation says that "od" explicitly uses binary mode (to aid CR debugging) and "cat" uses the default mode. My CYGWIN environment variable is not set at all, so from the Cygwin documentation, I expect pipes to be opened in binary mode. From the Windows 2000 side, I used Notepad to make a simple multiple line file. As far as I know, Notepad cannot avoid using <CRLF> as an end-of-line marker. From Cygwin bash, if I apply "od -x test.txt" to the test file, I see the 0a0d (counting from right to left) sequence I expect to be on the disk. If I instead do "cat test.txt | od -x" I get exactly the same result. 

In the second case, I expected "cat" not to see the <CR> on input, since it would be reading in textmode, but since its output was a pipe and CYGWIN was not set, the <CR> would not be reintroduced; "od" should always give me an accurate display of things. Hence, I expected the <CR> to be dropped. What do I have wrong?

While we're at it, what modes does "cp" use?


Chris Day
Berkeley Lab

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019