public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.7.35: .sh script in dos format does not work.
@ 2015-04-19 17:48 sean nakasone
  2015-04-19 19:35 ` Andrey Repin
  2015-04-20 15:07 ` Eric Blake
  0 siblings, 2 replies; 7+ messages in thread
From: sean nakasone @ 2015-04-19 17:48 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-04-23  3:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-19 17:48 1.7.35: .sh script in dos format does not work sean nakasone
2015-04-19 19:35 ` Andrey Repin
2015-04-19 21:09   ` Sean Nakasone
2015-04-20 15:07 ` Eric Blake
2015-04-20 15:14   ` Corinna Vinschen
2015-04-22 21:24   ` cyg Simple
2015-04-23  3:16     ` Eric Blake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).