delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/12/02:32:19

From: earnie_boyd AT yahoo DOT com (Earnie Boyd)
Subject: Re: More on relative pathname
12 Jan 1999 02:32:19 -0800 :
Message-ID: <19990111155821.21250.rocketmail.cygnus.gnu-win32@send102.yahoomail.com>
Reply-To: earnie_boyd AT yahoo DOT com
Mime-Version: 1.0
To: "Gordon Watts \(Brown University\)" <gwatts AT fnal DOT gov>,
gnu-win cygnus mailing list <gnu-win32 AT cygnus DOT com>

Hi Gordon,

I've tried your script.  I had to modify line 5 to be #!/bin/sh but
the script still fails as it is written.  If I modify line 16 to read
junk123/stuff.sh it seems to work fine.

I tried different variations of this including but not limited to
changing the shell to bash and trying to execute stuff.sh with bash -c
stuff.sh and sh -c stuff.sh.

The error isn't an indication that it can't find the script file
stuff.sh it is an indication that the file is locked and can't be
opened for reading.  Since I used both bash and sh and received the
same results this must be a bug with the winsup source.

The only workaround is to use the relative path to the file and not
rely on the PATH environment lookup.  BTW, another change I tried was
a `hash -r' command before the execution of stuff.sh.

Earnie.

---"Gordon Watts (Brown University)" <gwatts AT fnal DOT gov> wrote:
>
> Hi,
>   I'm still having the problem. I downloaded b20.1 and installed it
on a
> clean machine (hadn't seen versions of b19 or b20 or any other b
before). I
> still observe the error. I've included a small shell script below
which
> demonstrates the difficulty I'm having. Perhaps I'm making a
bone-headed
> unix mistake?
> 
> 	Cheers,
> 		Gordon.
> 
> ==============
> #!/bin/sh
> 
> mkdir junk123
> cat > junk123/stuff.sh <<EOF
> #/bin/sh
> echo hi
> EOF
> 
> chmod a+x junk123/stuff.sh
> 
> PATH=./junk123:${PATH}
> export PATH
> 
> echo Will now try to run the thing
> # I get an error on this line
> stuff.sh
> ==========

==
-                        \\||//
-------------------o0O0--Earnie--0O0o-------------------
--                earnie_boyd AT yahoo DOT com               --
-- http://www.freeyellow.com/members5/gw32/index.html --
----------------------ooo0O--O0ooo----------------------

PS: Newbie's, you should visit my page.
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019