delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/12/20/20:00:23

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
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Re: new install of cygwin with pdksh doesn't work
References: <uyu27ybtv7 DOT fsf AT tcsi DOT com> <20001220183538 DOT A24933 AT redhat DOT com>
<uyk88ubqlv DOT fsf AT tcsi DOT com> <20001220191907 DOT F25109 AT redhat DOT com>
From: dkarr AT tcsi DOT com (David M. Karr)
Date: 20 Dec 2000 16:57:20 -0800
In-Reply-To: Christopher Faylor's message of "Wed, 20 Dec 2000 19:19:07 -0500"
Message-ID: <uyae9qbngv.fsf@tcsi.com>
Lines: 51
User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.6
MIME-Version: 1.0

>>>>> "Christopher" == Christopher Faylor <cgf AT redhat DOT com> writes:
  Christopher> On Wed, Dec 20, 2000 at 03:49:32PM -0800, David M. Karr wrote:
  >>>>>>> "Christopher" == Christopher Faylor <cgf AT redhat DOT com> writes:
  Christopher> On Wed, Dec 20, 2000 at 02:39:08PM -0800, David M. Karr wrote:
  >> >> I have a relatively recent install of cygwin, along with pdksh-2.14.
  >> >> I have scripts that reference "/bin/ksh" that work fine.
  >> >> 
  >> >> Today I've been setting up these tools on another PC, and now when I
  >> >> execute "ksh", I get the following:
  >> >> 
  >> >> ksh: /cygdrive/d/dmk/.bashrc[1]: syntax error: `in^M' unexpected
  >> >> 
  >> >> I'm sure this has something to do with line endings, but I don't
  >> >> understand what has to be done.
  >> 
  Christopher> Remove the ^Ms in .bashrc.
  >> 
  >> I have none.  These are the exact same files I used on the other PC
  >> that is working fine.  I copied them directly from the PC that doesn't
  >> have the problem to the PC that does have the problem, without change.

  Christopher> What are you using to verify this?  od -c should show you if your
  Christopher> supposition that there are no ^Ms in your file is correct.

  Christopher> I would not be surprised to find out that you are wrong and that your
  Christopher> .bashrc file has lines that end with ^M^J(\r\n).

  Christopher> Editing the file with 'vi -b' should also show any ^Ms.

  Christopher> If you really don't have any ^Ms in your file then I am at a loss as
  Christopher> to why they would show up in your error output.

Ok, now I have a little more useful information.  The file does have
"\r\n" line endings.  Even my original file, from the PC installation
which works.  So the Cygwin installed on the first PC (from a couple
of months ago) can deal with ^Ms, but the new install cannot.  I tried
creating an ordinary file with Emacs, and it also produces ^Ms (using
"vi -b" to verify).  I can't use this arrangement if the files
produced by Emacs are invalid with Cygwin.  Again, I don't have this
problem on the original installation.

So does this have something to do with one of the initial choices you
get when you run "setup", which is "Default Text File Type", choices
"Dos" or "Unix"?  In order to get this to work, do I have to
completely reinstall, selecting "Dos"?  I believe that when I
installed Cygwin on the first PC, I didn't get those choices.

-- 
===============================================================================
David M. Karr     ; dkarr AT tcsi DOT com  ; w:(425)487-8312 ; TCSI & Best Consulting
Software Engineer ; Unix/Java/C++/X ; BrainBench CJ12P (#12004)


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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