From: "Gareth Pearce" <tilps@hotmail.com>
To: fergus@bonhard.uklinux.net, cygwin@cygwin.com
Subject: Re: Text file created from the keyboard is DOS termninated
Date: Sun, 08 Dec 2002 02:40:00 -0000 [thread overview]
Message-ID: <F83NOAmw8qmjWc0nVX8000161c7@hotmail.com> (raw)
> > 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).
>
Do you have CYGWIN variable set to contain binmode? - in one method your
doing input using pipes without file reference and in the other (i think ;P)
you are referencing a file (effectively at least). Without a file reference
- cygwin doesnt know binmode or textmode (i think) - so what it does depends
on the CYGWIN variable (and whatever the default is) ...
did i say "i think" enough times :)
Gareth
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--
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/
next reply other threads:[~2002-12-08 9:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-08 2:40 Gareth Pearce [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-12-07 20:07 Rolf Campbell
2002-12-08 0:15 ` fergus
2002-12-07 13:37 fergus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F83NOAmw8qmjWc0nVX8000161c7@hotmail.com \
--to=tilps@hotmail.com \
--cc=cygwin@cygwin.com \
--cc=fergus@bonhard.uklinux.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).