delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/11/21/10:00:45

X-Spam-Check-By: sourceware.org
Message-ID: <45631485.3010804@buddydog.org>
Date: Tue, 21 Nov 2006 10:00:21 -0500
From: Jonathan Arnold <jdarnold AT buddydog DOT org>
User-Agent: Thunderbird 1.5.0.5 (X11/20060804)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Help running bash scripts
References: <loom DOT 20061120T211910-507 AT post DOT gmane DOT org>
In-Reply-To: <loom.20061120T211910-507@post.gmane.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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

Thierry wrote:
> #!/bin/sh
> 
> # test
> 
> If I run the above script under cygwin, 
> I get the following error message:
> 
> $ ./test.sh
> : command not found
> 
> Can anyone help me on that and tell what I'm missing 
> from the cygwin installation?

(Pick me, pick me! I'll take this one)

You must be using an editor that inserts DOS cr/lf into the file.
bash doesn't work with them, either on Cygwin or on Linux. Either
run your script through d2u or, even better, use an editor that
won't insert dos line endings.

See the many long discussions on this list about it, as well as
reading the copious release notes for bash.

-- 
Jonathan Arnold                       http://www.buddydog.org

When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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