delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/09/19/13:07:42

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <20000919170353.4132.qmail@web125.yahoomail.com>
Date: Tue, 19 Sep 2000 10:03:53 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Subject: Re: strange script behavior with cygwin 1.0 bash
To: Arlen Barr <abarr AT telogy DOT com>,
"'cygwin AT sourceware DOT cygnus DOT com'" <cygwin AT sourceware DOT cygnus DOT com>
MIME-Version: 1.0

--- Arlen Barr <abarr AT telogy DOT com> wrote:
> Hi all,
> 
> I'm using bash 2.03 that came with the cygwin 1.0 distribution and am unable
> to run shell scripts that contain blank lines, I'm guessing because the
> files were created with a dos/windows editor that uses CRLF instead of LF.
> Every blank line produces the error message ": command not found", which
> leads me to believe it is a CRLF/LF problem.  The same scripts work fine,
> however, with bash in the cygwin beta 20 and cygwin 1.1 releases, and I have
> been using --norc and --noprofile options with the cygwin 1.0 bash which
> doesn't seem to help.  Anyone seen this behavior before?
> 

Yes, your error is most likely caused by \r\n line endings.  You must have
text=binary mounts, correct?  There are two ways to correct the problem:

1) remount your directories into text!=binary mode

2) cp foo.sh foo.tmp && tr -d '\r' < foo.tmp > foo.sh

3) Oops I said there were only two, use the most recent net release.

Cheers,

=====
--- <http://earniesystems.safeshopper.com> ---
   Earnie Boyd: <mailto:earnie_boyd AT yahoo DOT com>
            __Cygwin: POSIX on Windows__
Cygwin Newbies: <http://gw32.freeyellow.com/>
           __Minimalist GNU for Windows__
    Mingw Home: <http://www.mingw.org/>

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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