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

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: <4.2.0.58.20000928095148.00a31f00@pop.teknowledge.com>
X-Sender: rschulz AT pop DOT teknowledge DOT com
X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58
Date: Thu, 28 Sep 2000 10:05:56 -0700
To: "Guy T. Moore Jr." <gmoore AT openmarket DOT com>, cygwin AT sourceware DOT cygnus DOT com
From: Randall R Schulz <rschulz AT teknowledge DOT com>
Subject: Re: bash: ./myscript: No such file or directory. TMP variable
is being unset
Cc: perakis AT po-2 DOT openmarket DOT com, wabraham AT openmarket DOT com
In-Reply-To: <39D373A8.1AF731C0@openmarket.com>
Mime-Version: 1.0

Guy,

The fact that some shells fall back to treating files with execute 
permissions and no '#!' line as being suitable for execution by the 
standard system shell is really an artifact of a time long past. I humbly 
submit that you ought to use #! lines in all your "executable" scripts, 
even if they do operate in the way you intend on a bona fide Unix or Linux 
system.

You may have noticed that the synthesized execute permissions under Cygwin 
are keyed off of select file name extensions or the presence of '#!' as the 
first two characters of a file. I'd say Cygwin is bending over backward to 
create this degree of compatibility with Unix (-like) systems. There is 
little alternative since Windows file systems are impoverished as to 
explicit type information and access control attributes (as a Mac user and 
programmer I see file name suffixes as a very poor substitute for file type 
information).

Lastly, a quick (not thorough) check of the options and man page for BASH 
didn't reveal a way to enable the behavior you desire. Perhaps you could 
add such an option.

Randall Schulz
Teknowledge Corp.
Palo Alto, CA USA


At 09:36 AM 09/28/2000 , Guy T. Moore Jr. wrote:
>1.)
>Seems like I should be able to do the following simple shell scripting:
>
>I'm in a Cygwin 1.1.4 window at my C: prompt.
>
>I create a file, called myscript,  with the 1 line of:
>
>      echo "doggie"
>
>I cannot execute this successfully:
>
>$ ./myscript
>bash: ./myscript: No such file or directory.
>
>I can execute myscript succesfully if I add at the top of the
>myscript the line of:
>
>     #!/bin/sh
>
>and I can also execute myscript succesfully if I, preface the command with 
>/bin/sh:
>
>$ /bin/sh myscript
>
>I'd rather get it to work the way it does on Solaris 5.7 in a bourne shell 
>or csh
>without using any work arounds.
>
>This problem is preventing other simple things from working correctly.
>
>Guy Moore


--
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