This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]