delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/19/13:48:59

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:to:message-id:subject
:mime-version:content-type:content-transfer-encoding; q=dns; s=
default; b=TTVkVBL82T+k0j18e4Zqeu1L0PeO4Fdvgawq15tZYpkb8UfoOzlDs
DAEJDWC+rTXHN/iwLZQMVv67ALNtqcMzkj7kk6IYSDmEgTkeWQiX44D5584cmTKn
dob4C9yBpjorzvIL51VdMsVxhZeW326BjdvSBk7iDVz2dk09dqyx30=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:to:message-id:subject
:mime-version:content-type:content-transfer-encoding; s=default;
bh=xMccO2zDG8RWweI24V1PyBkI/NM=; b=sK2lj88yiiEQe5mFt6iTesjuevTB
jlFKr9G9VNcdRzyi8kk6pGsE7q7Fgy1TbmRT2bEWfRrnelqDLysWqq5geY+MwdhY
X0sQvnVC+UGfzif2vhBV/8xQShjdCWr0OK3uk3k9jey+CR7nmQwWJeVbUB464byh
QoHwRnpgSOWvmHk=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.7 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: nm13-vm5.bullet.mail.ne1.yahoo.com
Date: Sun, 19 Apr 2015 17:48:37 +0000 (UTC)
From: sean nakasone <seannakasone AT yahoo DOT com>
Reply-To: sean nakasone <seannakasone AT yahoo DOT com>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Message-ID: <235472002.6091440.1429465717870.JavaMail.yahoo@mail.yahoo.com>
Subject: 1.7.35: .sh script in dos format does not work.
MIME-Version: 1.0
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019