Mail Archives: cygwin/1996/12/22/15:37:03
I have a shell script called 'man' that is in the path and works fine from
bash unless the current working directory has a directory called 'man'
within it. For example:
chanrossa(1) rcs-5.7$ pwd
/usr/local/src/rcs-5.7
chanrossa(1) rcs-5.7$ ls -ld man
drwxr-xr-x 32 500 everyone 0 Jan 01 1970 man
chanrossa(1) rcs-5.7$ type -a man
man is /USR/LOCAL/BIN/man
chanrossa(1) rcs-5.7$ head -3 /usr/local/bin/man
#!/bin/sh
# man: show man page
set -x
chanrossa(1) rcs-5.7$ man diff3
man: man: Permission denied
^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: bash seems to find the shell script OK, then somehow when starting up
the subshell finds the directory ./man and tries to open this as the shell
script.
chanrossa(1) rcs-5.7$ cd /usr
chanrossa(1) /usr$ ls -ld man
/unix/h-i386-cygwin32/bin/ls: man: No such file or directory
chanrossa(1) /usr$ man diff3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Note: man script gets invoked correctly since ./man directory does not exist
here.
PATH setting is:
/USR/LOCAL/BIN:/UNIX/H-I386-CYGWIN32/BIN:.:/BIN:/d/PERL/BIN:/d/WIN95:/d/WIN95
/COMMAND:/DOS:/DEVEL/CAFE/BIN:/DEVEL/CAFE/JAVA/BIN
The odd thing is that even if bash was searching the path again for the
subshell it should still find the /usr/local/bin/man script first, not the
../man directory.
Richard
--
richardd AT cix DOT compulink DOT co DOT uk http://www.inside-edge.co.uk/
Inside Edge Consultancy Client/Server and Internet Applications
PGP key from: pgp-public-keys AT keys DOT pgp DOT net -or- http://www.four11.com/
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -