This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: mysterious bash problem


It might help to see foo.  UNIX shell scripts must begin with #! 
/path/to/shelltoexecute.  If you were on UNIX you would then have to set 
the executable bit on the file properties/permissions.  The cygwin.dll 
layer tries to mimick as much of UNIX as it can.  Since the file doesn't 
begin with #! you will not see the executable bit set on the permissions 
as that is how it determines if the file is executable.

I have noticed that the gnu-win32 bash will try to execute the script 
even without the #! indicator.  This is a bug as bash should error 
without this indicator.  For more information see the bash.info file.

>From: Ulrich Lauther <ulrich.lauther@mchp.siemens.de>
>Subject: mysterious bash problem
>To: gnu-win32@cygnus.com
>Date: Tue, 13 Jan 1998 09:31:23 +0100 (MET)
>Reply-To: Ulrich.Lauther@mchp.siemens.de
>
>
>On one NT host where I don't know who fiddled with what happens
>the following:
>
>Let foo be a valid shell script (starting with a ":" in the first line, 
BTW):
>
>bash$ foo
>
>gives:
>
>bash.exe: ./foo: (null)
>
>however,
>
>bash$ bash foo
>
>results in normal execution of the script
>
>this doesn't happen with all scripts, just some.
>
>ls -l gives -rw-r--r-- in all cases
>
>What the hell is going on here?
>-- 
>	-ulrich
>
>----------------------------------------------------------------------------
>Ulrich Lauther          ph: +49 89 636 48834 fx: ... 636 42284
>Siemens ZT SE 4         Internet: Ulrich.Lauther@mchp.siemens.de
>-
>For help on using this list (especially unsubscribing), send a message 
to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>


-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd@hotmail.com-
------ooo0O--O0ooo-------

Check out these great gnu-win32 related sites:
ftp://ftp.cygnus.com/pub/gnu-win32/latest/           (ftp site)
http://www.cygnus.com/pubs/gnupro/                   (Comercial Page)
http://www.cygnus.com/misc/gnu-win32/                (Project Page)
http://www.cygnus.com/ml/gnu-win32                   (Mail Archives)
http://www.itribe.net/virtunix/winhelp-man-pages/    (HTML Man Pages)
http://www.lexa.ru/sos                               (Sergey Okhapkin)
ftp://www.lexa.ru/pub/domestic/sos/                (Sergey's ftp site)
http://www.fu.is.saga-u.ac.jp/~colin/gcc.html        (Colin Peters)
http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ (Mumit Khan)
http://gnu-win32.paranoia.ru                   (Chuck Bogorad's ports)
ftp://ftp.deninc.com/pub (Den Internet Services - US mirror and ports)


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]