delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/17/15:04:52

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
From: David Rothenberger <daveroth AT acm DOT org>
MIME-Version: 1.0
Message-ID: <16111.26176.386305.122428@phish.entomo.com>
Date: Tue, 17 Jun 2003 12:04:32 -0700
To: cygwin AT cygwin DOT com
Subject: [ANNOUNCEMENT] Testversion uploaded: bash-2.05b-10
In-Reply-To: <16111.20530.222382.144129@phish.entomo.com>
References: <20030617152121 DOT AF70F6C688 AT redhat DOT com>
<16111 DOT 20530 DOT 222382 DOT 144129 AT phish DOT entomo DOT com>
Reply-To: cygwin AT cygwin DOT com

David Rothenberger writes:
 > 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

Well, I spoke too soon.  I am having a very bizarre problem with
scripts using DOS line endings on textmode mounts.  Here's how to
recreate the problem.

Create a file named "good":
----------------------------------------------------------------------
#!/bin/bash
true
date
----------------------------------------------------------------------

and another file named "bad":
----------------------------------------------------------------------
#!/bin/bash
date
true
----------------------------------------------------------------------

Create these on a textmode mode.  Then, run the following commands:

$ cp bad bad-dos
$ cp bad bad-unix
$ cp good good-dos
$ cp good good-unix
$ dos2unix *-unix
$ unix2dos *-dos

Now, run the scripts.  All will work fine except for "bad-dos",
which produces the following output:

$ ./bad-dos
Tue Jun 17 12:00:18 PDT 2003
./bad-dos: line 3: rue: command not found

It seems like when bash invokes an external command, it eats the
first character of the next line.  It doesn't seem to have a problem
after invoking a builtin command.

All of the scripts run fine on binmode mounts.

cygcheck output was attached to my previous posting in this thread.

I'm going to have to go back to the previous version because this
breaks some of the scripts I use at work.  Let me know if there's
any other information required.

-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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019