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 Date: Fri, 1 Sep 2000 19:20:30 +0400 From: Egor Duda X-Mailer: The Bat! (v1.45) Personal Reply-To: Egor Duda Organization: DEO X-Priority: 3 (Normal) Message-ID: <27369117122.20000901192030@logos-m.ru> To: Cygwin , mike AT blueoaksoftware DOT com Subject: Re: Fwd: UPDATE: Newbie bash user problem--interactive bash will not run my scripts! In-reply-To: <20000901110536.L1104@DP> References: <20000901110536 DOT L1104 AT DP> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi! Friday, 01 September, 2000 Jason Tishler Jason DOT Tishler AT dothill DOT com wrote: >> Still no luck on working, but I have run some tests and have >> cygcheck diagnostics. BTW, I *do* have '.' (and also tried './') on >> my path in various places. >> >> Here is the one-line (or two) shell script (test.sh) that I'm using as a >> test: >> >> echo "We did it!" >> >> Here is the output calling this script (and me typing a comment before each >> invocation): >> >> /cygdrive/c/Work/gc/distrib 320%># Only the one line shown in the script: >> /cygdrive/c/Work/gc/distrib 321%>test.sh >> BASH.EXE: ./test.sh: No such file or directory >> /cygdrive/c/Work/gc/distrib 322%># I've now added #!/bin/sh as first line to >> sc >> ript: >> /cygdrive/c/Work/gc/distrib 323%>test.sh >> We did it! >> /cygdrive/c/Work/gc/distrib 324%># I've now added #!/bin/bash as first line >> to >> script: >> /cygdrive/c/Work/gc/distrib 325%>test.sh >> We did it! >> /cygdrive/c/Work/gc/distrib 326%> the reason is simple. bash starts only files that have permission to execute. you can check file permissions by typing % ls -la test.sh you're running w98, and thus have no ntsec features (ntsec emulates unix permissions by native ones). when running without ntsec, cygwin does a little trick to determine which files should have executable bit in their permissions -- it set this bit only for files with .exe, .cmd and .bat extensions and those which starts with magic symbols #! note that if you try to start your script like that % bash -c test.sh it will work in all 3 cases, since for '-c' parameter bash won't check permissions Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19 -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com