[ANNOUNCEMENT] Testversion uploaded: bash-2.05b-10
David Rothenberger
daveroth@acm.org
Tue Jun 17 17:47:00 GMT 2003
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
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: cygcheck.out
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030617/bbf283da/attachment.ksh>
-------------- next part --------------
--
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/
More information about the Cygwin
mailing list