Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: Chris Faylor Date: Thu, 28 Sep 2000 17:14:32 -0400 To: cygwin AT sourceware DOT cygnus DOT com Cc: David Starks-Browning Subject: Re: Can't exec /bin/sh.exe at ./dog.sh line 1. Message-ID: <20000928171432.B14079@cygnus.com> Reply-To: cygwin AT sources DOT redhat DOT com Mail-Followup-To: cygwin AT sourceware DOT cygnus DOT com, David Starks-Browning References: <39D373A8 DOT 1AF731C0 AT openmarket DOT com> <39D3B161 DOT C49B2F93 AT openmarket DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.6i In-Reply-To: <39D3B161.C49B2F93@openmarket.com>; from gmoore@openmarket.com on Thu, Sep 28, 2000 at 05:00:17PM -0400 On Thu, Sep 28, 2000 at 05:00:17PM -0400, Guy T. Moore Jr. wrote: >Thanks for all the replies. None solved it. >Let me cut to the chase with the problem that more resembles my problem: > >Using Cygwin 1.1.4. >I'm on C: drive, an NTFS partition. >CYGWIN is set to "binmode ntea" >I do not have McAfee anti-virus software running. >my machine has been rebooted and am in a fresh window. > > >This is my script called dog.sh and has been chmod to 777. > > #!/bin/sh.exe > # > echo "Hello" > echo $0 > eval "exec perl -S $0 " <------- problem line > if $avariablenotdefined; > print "GoodBye"; > > > >When I execute this script, I get an error: > > $ c:/dog.sh > Hello > c:/dog.sh > Can't exec /bin/sh.exe at ./dog.sh line 1. > >Why is Cygwin exec'ing /bin/sh.exe when it should be exec'ing perl? >And why can't Cygwin exec /bin/sh.exe anyways? The "Can't exec /bin/sh.exe at ./dog.sh line 1" message is coming from *perl*. You're not running a cygwin version of perl so it doesn't know how to find /bin/sh.exe. This really should be a FAQ, I suppose, if it isn't already. cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com