This is the mail archive of the
cygwin
mailing list for the Cygwin project.
1.7.35: .sh script in dos format does not work.
- From: sean nakasone <seannakasone at yahoo dot com>
- To: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Sun, 19 Apr 2015 17:48:37 +0000 (UTC)
- Subject: 1.7.35: .sh script in dos format does not work.
- Authentication-results: sourceware.org; auth=none
- Reply-to: sean nakasone <seannakasone at yahoo dot com>
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.
Thanks,
Sean
--
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