www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/12/08/03:11:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <000c01c29e91$53b96260$b17b1f3e@leper>
Reply-To: <fergus AT bonhard DOT uklinux DOT net>
From: <fergus AT bonhard DOT uklinux DOT net>
To: <cygwin AT cygwin DOT com>
Cc: "Rolf Campbell" <rcampbell AT tropicnetworks DOT com>,
<fergus AT bonhard DOT uklinux DOT net>
References: <83040F98B407E6428FEC18AC720F5D732DB777 AT exchange DOT tropicnetworks DOT com>
Subject: Re: Text file created from the keyboard is DOS termninated
Date: Sun, 8 Dec 2002 08:10:52 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

> Your are using textmode mounts.  Worx fine with binmode:

Thanks for trying this out. I'm not using textmode mounts; and it doesn't
seem to be working fine with binmode. Contrast the two methods of textfile
creation in the following snippet:

============
 ~> mount
c:\Cygwin\bin on /usr/bin type system (binmode)
c:\Cygwin\lib on /usr/lib type system (binmode)
c:\Cygwin on / type system (binmode)
c: on /cygdrive/c type user (binmode,noumount)

~> cat > file1 << X
> line1
> line2
> X
~> od -tx1 file1
0000000 6c 69 6e 65 31 0a 6c 69 6e 65 32 0a
0000014

~> cat > file2
line1
line2
~> od -tx1 file2
0000000 6c 69 6e 65 31 0d 0a 6c 69 6e 65 32 0d 0a
0000016
~>
============

So I can get what I require (Unix terminators) by appending <<X to the cat
line; but I'd still like to know the reason for the intrusive 0d under the
other method, and whether it is a "bug" in the sense that it really
shouldn't be happening at all (which is what I feel about it).

Fergus


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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