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)" 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 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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) 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/