From mboxrd@z Thu Jan 1 00:00:00 1970 From: Randall R Schulz To: "Guy T. Moore Jr." , cygwin@sourceware.cygnus.com Cc: perakis@po-2.openmarket.com, wabraham@openmarket.com Subject: Re: bash: ./myscript: No such file or directory. TMP variable is being unset Date: Thu, 28 Sep 2000 10:04:00 -0000 Message-id: <4.2.0.58.20000928095148.00a31f00@pop.teknowledge.com> References: <39D373A8.1AF731C0@openmarket.com> X-SW-Source: 2000-09/msg00943.html 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@sourceware.cygnus.com