This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: Text file created from the keyboard is DOS termninated
- From: "Rolf Campbell" <rcampbell at tropicnetworks dot com>
- To: <fergus at bonhard dot uklinux dot net>,<cygwin at cygwin dot com>
- Date: Sat, 7 Dec 2002 21:25:43 -0500
- Subject: RE: Text file created from the keyboard is DOS termninated
Your are using textmode mounts. Worx fine with binmode:
/home/rcampbell> cat > a << A
> a
> a
> A
/home/rcampbell> od -tx1 < a
0000000 61 0a 61 0a
0000004
> -----Original Message-----
> From: fergus@bonhard.uklinux.net [mailto:fergus@bonhard.uklinux.net]
> Sent: Saturday, December 07, 2002 3:10 PM
> To: cygwin@cygwin.com
> Cc: fergus@bonhard.uklinux.net
> Subject: Text file created from the keyboard is DOS termninated
>
>
> I am set up for "Unix" rather than "DOS" and created a text
> file directly from the keyboard by typing
>
> $ cat > textfile
> this is line1 <press Enter>
> this is line2 <press Enter>
> <press Ctrl-D>
> $
>
> It turns out that the two-line file textfile created by this
> method, is DOS-terminated. I was kind of thinking it would
> (should?) be Unix-terminated. I know there are 100 threads on
> line termination, but in contexts more sophisticated than
> this. Please can somebody tell me whether this is a bug; or
> meant to happen (if so, why); or comment with assurance that
> my "Unix" set-up must be faulty in some way (correctable?)
>
> Thank you. By the way, if I try
>
> $ cat > textfile << X
> > this is line1 <press Enter>
> > this is line2 <press Enter>
> > X <press Enter>
> $
>
> (where > is the provided prompt) then the two-line file
> textfile is Unix-terminated.
>
> 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/
>
>
--
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/