Subject: How do I get bash to run shell scripts?
From: [email-masked] (Francis Litterio)

2 Jan 1997 13:01:42 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Original-To: [email-masked]
Original-Sender: [email-masked]

I'm using the 17.1 release, and bash refuses to execute scripts that
are definitely in my PATH.  Here's what I see:

    bash$ mount
    Device           Directory           Type        Flags
    c:\temp          /tmp                native      no-mixed,text!=binary
    \\.\tape1:       /dev/st1            native      no-mixed,text!=binary
    \\.\tape0:       /dev/st0            native      no-mixed,text!=binary
    \\.\b:           /dev/fd1            native      no-mixed,text!=binary
    \\.\a:           /dev/fd0            native      no-mixed,text!=binary
    c:\APPS\cw\H-i386-cygwin32\bin /bin  native      no-mixed,text!=binary
    c:               /                   native      no-mixed,text!=binary
    bash$ echo $PATH
    /franl/bin:/bin:/WINNT/system32:/WINNT:/dos
    bash$ pwd
    /franl
    bash$ cat > bin/bletch
    #!/bin/sh
    echo hello
    ^Z
    bash$ chmod +x bin/bletch
    bash$ hash -r
    bash$ which bletch
    bletch is /franl/bin/bletch
    bash$ ls -l bin/bletch
    -rwxr-xr-x   1 500      everyone       23 Jan 02 13:59 bin/bletch
    bash$ bin/bletch
    hello
    bash$ /franl/bin/bletch
    hello
    bash$ type bletch
    bletch is hashed (/franl/bin/bletch)
    bash$ bletch
    bletch: bletch: No such file or directory

It knows the script is there, because it hashed its path, but it will
not execute it when given just the script name.  I even tried changing
the "#!/bin/sh" to "#!/bin/sh.exe", but that didn't help.  Ordinary
..exe's work fine:

    bash$ pwd
    /franl
    bash$ cp /bin/ls.exe bin/goo.exe
    bash$ goo -l bin/goo.exe
    -rwxr-xr-x   1 500      everyone    51200 Jan 02 14:11 bin/goo.exe

Oddly, if I cd into my bin directory, it works (even though . is not
in my path):

    bash$ cd bin
    bash$ pwd
    /franl/bin
    bash$ bletch
    hello

Has anyone seen this before?  Anyone know what to do about it?
Running shell scripts is a pretty basic part of the whole UNIX thing,
so I feel crippled without it.
-- 
Francis Litterio                     PGP Key Fingerprint:
[email-masked]                  02 37 DF 6C 66 43 CD 2C
http://world.std.com/~franl/         10 C8 B5 8B 57 34 F3 21

-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".