Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Subject: RE: [ANNOUNCEMENT] Testversion uploaded: bash-2.05b-10 Date: Wed, 18 Jun 2003 09:42:22 +0200 Message-ID: <6A01730CB1AA1D4785F0586DE5E5617D1754FA@mx-dk1.dk.vitesse.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: From: "Yanghui Bian" To: Cc: Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h5I7gZW17225 Hello David, Sorry, it's not directly related to this topic. Please allow me to ask the question below. It's about the CRLF<->LF conversion. I have tried to do the same conversion in Perl/C but failed. Cygwin always return me the result that the file is in unix format. However I could know that it is in pc format by opening it in emacs and convert it to unix format sucessfully using emacs elisp. The cygwin is mounted in bin&unix mode. But from you description above, you don't have the problem. Could you let me know which tool you use for conversion, please? Thanks. -----Original Message----- From: David Rothenberger [mailto:daveroth AT acm DOT org] Sent: 17. juni 2003 19:30 To: cygwin AT cygwin DOT com Subject: [ANNOUNCEMENT] Testversion uploaded: bash-2.05b-10 Corinna Vinschen writes: > Please give it a try, especially if you're using textmode mounts. If > nobody complains about problems which result from that patch within, > say, two or three weeks, I'll make this the standard version of bash. I don't have any problems running scripts from textmode mounts, but I did notice a change in behavior while sourcing DOS files from binmode mounts. With the prior version of bash, I had no problems sourcing a DOS-formatted file from a binmode mount, but with the latest version, I get parsing errors. Here's a simple test: I created two files, "dos" and "unix", each with the following content (without the dash lines, of course): ---------------------------------------------------------------------- if [ 1 -eq 1 ]; then echo true; else echo false; fi ---------------------------------------------------------------------- I then used dos2unix and unix2dos to ensure that "dos" used DOS line endings and "unix" used the other kind. This was all done on a binmode mount, by the way. Sourcing the two files yielded the following results: ---------------------------------------------------------------------- $ . dos bash: dos: line 2: syntax error: unexpected end of file $ . unix true ---------------------------------------------------------------------- When I copied these two files to a textmode mount, reran the dos2unix and unix2dos commands, and repeated the above statements, both commands returned true. I don't regard this as a bug, since everything works fine with textmode mounts and it's perfectly reasonable, IMHO, for the parse errors to occur when trying to source a file with DOS endings on a binmode mount. It's what would happen under Linux, after all. But I wanted to mention it because it is a change in behavior, and might cause a bunch of "bash isn't working" postings when this version of bash is made official. cygcheck output is attached, in case it matters. -Dave -- 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/