This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: bash CRLF problems (I have read the recent announcement)
Larry Hall (Cygwin) <reply-to-list-only-lh@cygwin.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/