From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21146 invoked by alias); 27 Mar 2015 19:05:13 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 21137 invoked by uid 89); 27 Mar 2015 19:05:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: akamoz.jp Received: from f1a03-0021.din.or.jp (HELO akamoz.jp) (61.122.77.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with SMTP; Fri, 27 Mar 2015 19:05:11 +0000 Received: from localhost (HELO bird.akamoz.jp) (127.0.0.1) by localhost with SMTP; 27 Mar 2015 19:05:06 -0000 To: cygwin@cygwin.com Subject: Re: bash-4.3.33-1 fails to execute shell script with CR+LF EOL in text-mounted directory From: References: <20150326153734.60517.qmail@mx.akamoz.jp> Date: Fri, 27 Mar 2015 20:00:00 -0000 Mime-Version: 1.0 X-Attachments: test.sh; Content-Type: MultiPart/Mixed;Boundary="---------1427482990-24341990" Message-ID: <20150327190506.63383.qmail@mx.akamoz.jp> X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00497.txt.bz2 -----------1427482990-24341990 Content-Type: text/plain; charset=us-ascii Content-length: 1934 Dear Eric and the other developers: > > It seems that bash-4.3.33(1) handles CR+LF end-of-line in > > the shell-script incorrectly, all of the following conditions are met: > > b. end-of-line style of the file is CR+LF, and > Are you absolutely sure that you don't have excess CR in your file? > text mounts only treats the CRLF as a single newline, but does not eat > lone CR elsewhere in the file. The script under test is created on the editor working on Windows (Hidemaru), so that no additional CR is found in the script. I checked it by using od. > > It works: > > d. it is on the binary-mounted directory, and with igncr shell-option, > Does igncr make a difference in the text mount directory situation? No difference is made on the text mount directory, igncr is applied or not, which means the script doesn't work on text mount directory regardeless of whether igncr is specified or not, like that: --- 8< ------ 8< ------ 8< ------ 8< ------ 8< --- $ LANG=C bash -o igncr test.sh hoge test.sh: line 3: fuga: command not found test.sh: line 4: piyo: command not found test.sh: line 5: o: command not found test.sh: line 6: ho: command not found test.sh: line 7: cho: command not found --- 8< ------ 8< ------ 8< ------ 8< ------ 8< --- On binary mount directory without igncr, CRs are recognized as a part of a command name by bash, as usual. > > shell-script to test: (WITH CR+LF END-OF-LINE STYLE) > > --- 8< ------ 8< ------ 8< ------ 8< ------ 8< --- > Please ATTACH the script as a binary file, rather than pasting it inline > in your email; or at a bare minimum, show 'od -tx1z yourscript' to make I've attached the script. I'm sorry that I lost your original message, I'm writing this from the message which is gotten from cygwin mailing list web interface. This does not have the message ID to use threading the messages, so I reply to my own message to continue the thread. Best Regards. -----------1427482990-24341990 Content-Transfer-Encoding: base64 Content-Type: application/octet-stream;name="test.sh" Content-Description: test.sh Content-length: 118 IyEvYmluL2Jhc2gNCmVjaG8gaG9nZSAmDQplY2hvIGZ1Z2EgJg0KZWNobyBw aXlvICYNCmVjaG8gZm9vICYNCmVjaG8gYmFyICYNCmVjaG8gYmF6DQo= -----------1427482990-24341990 Content-Type: text/plain; charset=us-ascii Content-length: 218 -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -----------1427482990-24341990--