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]
Other format: [Raw text]

Re: stop cygwin sed adding ^M


OK I think I know why I had this problem now. You're saying if my drive is 
mounted in text mode then sed will insert ^M at the end of lines.
This won't happen though if the drive is mounted in bin mode. Right?

In that case I have one more question. When I start cygwin as an 
administrator, my c drive is mounted as:

c: on /cygdrive/c type user (binmode,noumount)

but if I'm logged on as a local user, it's mounted in text mode.
How can I change this as a local user to be mounted in binary?

Thanks,

JS.

>From: Christopher Faylor <cgf@redhat.com>
>Reply-To: cygwin@cygwin.com
>To: cygwin@cygwin.com
>Subject: Re: stop cygwin sed adding ^M
>Date: Wed, 23 Jan 2002 13:26:31 -0500
>MIME-Version: 1.0
>Received: from [209.249.29.67] by hotmail.com (3.2) with ESMTP id 
>MHotMailBE184B9300114136E853D1F91D430BCD0; Wed, 23 Jan 2002 10:27:31 -0800
>Received: (qmail 2849 invoked by alias); 23 Jan 2002 18:26:35 -0000
>Received: (qmail 2783 invoked from network); 23 Jan 2002 18:26:34 -0000
>Received: from unknown (HELO lacrosse.corp.redhat.com) (12.107.208.154)  by 
>sources.redhat.com with SMTP; 23 Jan 2002 18:26:34 -0000
>Received: from cgf.cipe.redhat.com (dhcpd247.meridian.redhat.com 
>[172.16.47.247])by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id 
>g0NIQY319737for <cygwin@cygwin.com>; Wed, 23 Jan 2002 13:26:34 -0500
>Received: (from cgf@localhost)by cgf.cipe.redhat.com (8.11.6/8.8.7) id 
>g0NIQVw17956for cygwin@cygwin.com; Wed, 23 Jan 2002 13:26:31 -0500
>From cygwin-return-43764-vervoom Wed, 23 Jan 2002 10:29:22 -0800
>Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
>Precedence: bulk
>List-Unsubscribe: 
><mailto:cygwin-unsubscribe-vervoom=hotmail.com@cygwin.com>
>List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
>List-Archive: <http://sources.redhat.com/ml/cygwin/>
>List-Post: <mailto:cygwin@cygwin.com>
>List-Help: <mailto:cygwin-help@cygwin.com>, 
><http://sources.redhat.com/ml/#faqs>
>Sender: cygwin-owner@cygwin.com
>Delivered-To: mailing list cygwin@cygwin.com
>Message-ID: <20020123182631.GA16029@redhat.com>
>Mail-Followup-To: cygwin@cygwin.com
>References: <C2D7D58DBFE9D111B0480060086E96350689BB99@mail_server.gft.com> 
><20020123175442.GJ6765@redhat.com> 
><20020123191418.F11608@cygbert.vinschen.de>
>In-Reply-To: <20020123191418.F11608@cygbert.vinschen.de>
>User-Agent: Mutt/1.3.23.1i
>
>On Wed, Jan 23, 2002 at 07:14:18PM +0100, Corinna Vinschen wrote:
> >On Wed, Jan 23, 2002 at 12:54:42PM -0500, Chris Faylor wrote:
> >> On Wed, Jan 23, 2002 at 03:58:57PM +0100, Schaible, Jorg wrote:
> >> >May be you should read the FAQ regarding text mounts ??
> >>
> >> sed is a fully ported utility.  It is supposed to read CRLF text on
> >> standard input and produce only UNIX-style newline endings on standard
> >> output.
> >
> >There's one situation I know that it actually converts LF to CRLF.
> >
> >Say, you have a file foo:
> >
> >$ od -c foo
> >0000000   h   a   l   l   o  \n
> >0000006
> >
> >and your currently in a textmode mounted directory, then
> >
> >$ sed -e 's/ll/nn/' foo > bar
> >
> >creates actually a CRLF file bar:
> >
> >$ od -c bar
> >0000000   h   a   n   n   o  \r  \n
> >0000007
> >
> >and that's defined behaviour.  That isn't even going on in sed.
> >The stdio redirection has already happened in the shell and sed
> >is just using that file descriptor.
>
>I stand corrected.
>
>Sorry for the misinformation.
>
>cgf
>
>--
>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/
>


_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


--
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/


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