Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37C66E4D.DEC8E87@dev.tivoli.com> Date: Fri, 27 Aug 1999 12:54:05 +0200 From: Rob Tulloh X-Mailer: Mozilla 4.61 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: cygwin AT sourceware DOT cygnus DOT com Subject: B20.1 relative path names in PATH not working? References: <19990825124940 DOT 18673 DOT rocketmail AT web119 DOT yahoomail DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Howdy, Is there a reason why a relative path in a PATH variable can't be used to locate a command/script to be executed by bash/sh? Here is an example of what I mean: > bash-2.02$ cd i:/tmp > bash-2.02$ ls foobar barfoo > barfoo: > > foobar: > foo > bash-2.02$ foobar/foo > hi there > bash-2.02$ cd barfoo > bash-2.02$ foo > bash: foo: command not found > bash-2.02$ echo $PATH > /apps/work/cygnus/CYGWIN~1/H-I586~1/bin://C/WINNT40/system32://C/WINNT40:/apps/w > ork/Personal_Communications:/apps/WinDbg/Bin:/apps/WinDbg/Bin/WinNT:/tools/msvc4 > 1/BIN://C/WIN98://C/WIN98/COMMAND://C/DOS > bash-2.02$ PATH=$PATH:../foobar > bash-2.02$ foo > foo: Can't open foo > bash-2.02$ ls /bin/sh > /bin/sh > bash-2.02$ cat ../foobar/foo > #!/bin/sh > > echo hi there > bash-2.02$ ../foobar/foo > hi there > bash-2.02$ It seems that bash sees the file, but cannot grok the #!/bin/sh or something like this. Notice the message changes after I added the relative path to the PATH variable. It was 'command not found' before I changed PATH. After PATH was updated, the message changed to "foo: Can't open foo". I searched Users Guide, the FAQ, and the mail archives for August and July and I do not see any information on restrictions on the use of relative paths. I tried to search for "Can't open" in the search engine and didn't any hits on that either. However, even simple queries for things like PATH and path don't return results either. This makes me think the search engine is broken or something :-( Did I miss something important? Note that it is helpful to use relative paths in places like a build environment when make sets PATH each time it launches in a sub-directory relative to fixed location. Thank you, Rob -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com