Fwd: UPDATE: Newbie bash user problem--interactive bash will not run my scripts!
Egor Duda
deo@logos-m.ru
Fri Sep 1 08:23:00 GMT 2000
Hi!
Friday, 01 September, 2000 Jason Tishler Jason.Tishler@dothill.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@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
More information about the Cygwin
mailing list