This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

1.7.35: .sh script in dos format does not work.

Hi Folks, I think the .sh scripts that are in dos format are not being interpreted properly.

--- Workflow to reproduce error ---

Downloaded cygwin 1.7.35, changed binary to text in the etc/fstab file.

Created a sh script with contents below:
touch a.txt
chmod 777 a.txt

Put 2 newlines at the end of the script.
Save the file as a dos text file (with carriage-returns).

--- Error when running script ---

line 2: mod: command not found

--- More detailed info ---

mod is chmod with the first 2 characters erroneously chopped off.
The more newlines you put at the end of the file, the more characters get chopped off.

--- Other things I tried ---

I tried this on a new Windows 8.1 (64-bit OS, 32-bit cygwin) and Windows Vista (32-bit OS), put the \cygwin\bin and \cygwin\usr\bin at front of PATH env var, and got the same error.

In fstab, i changed text to binary, changed the script to unix format, didn't get an error.

Here's my fstab entry:
none /cygdrive cygdrive text,posix=0,user 0 0

I downgraded to cygwin 1.7.33 and I don't get the error.

I read the fstab documentation, can't figure out what "none" is used for.  I tried other fstab entries, nothing seemed to fix the issue.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]