From: DAUTREVAUX AT microprocess DOT com (Bernard Dautrevaux) Subject: RE: More on relative pathname 13 Jan 1999 16:55:02 -0800 Message-ID: <8135911A809AD211AF6300A02480D1750348BE.cygnus.gnu-win32@IIS000.microdata.fr> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit To: "'Gordon Watts (Brown University)'" , gnu-win cygnus mailing list > -----Message d'origine----- > De: Gordon Watts (Brown University) [SMTP:gwatts AT fnal DOT gov] > Date: Monday, January 11, 1999 19:27 > À: Bernard Dautrevaux; gnu-win cygnus mailing list > Objet: RE: More on relative pathname > > Hi, > Thanks. Forgetting the "!" was a typo. Some people can reproduce > this > error and others have my script work just fine. I'm starting to wonder > if it > has something to do with the file system or locking or permissions. > OK, so I try to reproduce here and here we are: > The symptoms are the same weather or not the "!" is present, btw. The > error > I get is the following: > > bash-2.01$ PATH=./junk123:${PATH} > bash-2.01$ export PATH > bash-2.01$ stuff.sh > stuff.sh: Can't open stuff.sh > bash-2.01$ type stuff.sh > stuff.sh is hashed (././junk123/stuff.sh) > I effectively get this, with or without the '!' > Note -- the error is different than if it can't find the command: > > bash-2.01$ bogus.fruitcake > bash: bogus.fruitcake: command not found > Then I look at my path, adn see that it starts by some relative directory, and seems to remember I already get some problems with that; I then changed: PATH=./junk123:${PATH} by PATH=`pwd`/junk123:${PATH} and it works... (but I bet you already know that). Then I try to understand what happens: it is not the current bash that can't read stuff.sh: type find it... So I try this: I change the script like this: ============= #!/bin/sh mkdir junk123 cat > junk123/stuff.sh < junk123/stuff.sh <