Mail Archives: cygwin/2003/06/17/15:04:52
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 -