public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: sean nakasone <seannakasone@yahoo.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: 1.7.35: .sh script in dos format does not work.
Date: Sun, 19 Apr 2015 17:48:00 -0000	[thread overview]
Message-ID: <235472002.6091440.1429465717870.JavaMail.yahoo@mail.yahoo.com> (raw)

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

             reply	other threads:[~2015-04-19 17:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-19 17:48 sean nakasone [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=235472002.6091440.1429465717870.JavaMail.yahoo@mail.yahoo.com \
    --to=seannakasone@yahoo.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).