Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sources.redhat.com Delivered-To: mailing list cygwin@sources.redhat.com Message-Id: <4.3.1.2.20011106115046.02244df0@pop.ma.ultranet.com> X-Sender: lhall@pop.ma.ultranet.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Tue, 06 Nov 2001 11:55:55 -0500 To: Jonathan Hudgins , cygwin@cygwin.com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: cygwin bash #! error: bad interpreter In-Reply-To: <3BE80EB7.A334A9D7@agames.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 11:24 AM 11/6/2001, Jonathan Hudgins wrote: >I am creating some scripts and I get the following error: > bad interpreter: no such file or directory > >Most machines that have cygwin installed work fine. But one machine reports >this error when I use: >#!bash > OR >#!perl > >BUT the error disappears when I use: >#!/usr/bin/perl >#!/usr/bin/bash > >And to confuse the matter even more, if I do (on the violating machine): >which perl > OR >which bash > >I get: >/usr/bin/perl > OR >/usr/bin/bash > >I have reinstalled cygwin several times and looked for anything in the setup or >configuration that might cause such a problem, but I have had no luck. > >ALSO suspect: when i do "vi script" from cygwin I see ^M's at the end of lines. >I don't get the same problem on other machines with cygwin. I did remove the ^M >and still had the same problem with my script. > >ALSO after seeing an email on this same subject I deleted the regestration keys: >HKEY_CURRENT_USER/Software/Cygnus Solutions >HKEY_LOCAL_MACHINE/Software/Cygnus Solutions >AND then reinstalled. >WHICH STILL DIDN'T work. > >Is it possible that I am using a bad setup.exe? >I have reinstalled from a local drive (with packages downloaded in October >2001). > >ANY IDEAS? Yes. You're using a bad form. Use "#!/bin/bash" or "#!/bin/perl". This is (de facto?) standard so you won't see problems if you've installed correctly. Alternatively, you can put the path to bash in your path. This is very likely the problem you're seeing. If bash is in your path, your #!bash will work. I don't recommend this as the solution however. Larry Hall lhall@rfk.com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/