delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/12/04/19:42:11

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
Subject: Re: bash CRLF problems (I have read the recent announcement)
In-reply-to: <4574AE59.5080801@cygwin.com>
References: <7794 DOT 1165273150 AT gemini DOT franz DOT com> <4574AE59 DOT 5080801 AT cygwin DOT com>
Comments: In-reply-to "Larry Hall (Cygwin)" <reply-to-list-only-lh AT cygwin DOT com> message dated "Mon, 04 Dec 2006 18:25:13 -0500."
X-Mailer: MH-E 8.0.2; nmh 1.1; GNU Emacs 21.4.1
Date: Mon, 04 Dec 2006 16:41:54 -0800
Message-ID: <11218.1165279314@gemini.franz.com>
From: Kevin Layer <layer AT franz DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

Larry Hall (Cygwin) <reply-to-list-only-lh AT cygwin DOT com> wrote:

>> > version=`cat foo1.out`
>> > ...
>> Time to adjust your expectations. ;-)  Text mounts write CRNL as EOLs
>> for all files that are not explicitly opened as binary (or text for
>> that matter).  Text mounts remove the CR from EOLs read from files that
>> are not explicitly opened as binary (or text).  'cat' explicitly opens
>> the file as binary.  

What is the portable way to get the contents of foo1.out into a
variable, getting proper translation of the end of lines?  (If the
answer is use `d2u' that is not portable.)  I thought I was safe by
using text mounts--I spent quite a while looking at the archives
before posting and thought I had covered all bases. 

Kevin

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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