Machine Type: i686-pc-cygwin
Bash Version: 2.05b
Patch Level: 0
Release Status: release
Description:
[Detailed description of the problem, suggestion, or complaint.]
Hello, and thanks in advance for the help.
I am having trouble getting bash to interpret #! lines correctly. Here are
the details.
I made myself a little script called "myinterp", shown below:
#!/bin/sh
echo "got into myinterp"
I stored "myinterp" in c:/ then wrote a little shell script called "mytest".
Here it is:
#! c:/myinterp
echo "hello from mytest"
If I run "mytest" from the working directory, then everything is great. But
if I change to some directory other than the one contining "mytest", and
then
run "mytest" using a full path, it fails the first time, giving me the
message
bash: /cygdrive/e/sandbox/env/Jobs/sysgen/bin/mytest: c:/myinterp: bad
interpreter: No such file or directory
Oddly enough, if I try the same thing a second or third time, it works the
way it should. I might be able to live with this, even though it's an
irritation. But things get worse. If I run the test simply by typing
"mytest" (in other words, if I count on my path to find the script), then
I always get the error message about the missing interpreter.
I thought perhaps I had an unholy mixture of software on my machine (three
year-old Dell PC running Win XP Pro), so I completely uninstalled my copy of
Cygwin (including the registry entries), then downloaded the latest from
cygwin.com and reinstalled, but I still have the problem. I also tried
running tcsh, which made the problem disappear.
Jeff Stroomer
jeff.stroomer@xilinx.com
Repeat-By:
[Describe the sequence of events that causes the problem
to occur.]
See above.
Fix:
[Description of how to fix the problem. If you don't know a
fix for the problem, don't include this section.]
[Prev in Thread]
Current Thread
[Next in Thread]
bash sometimes can't find #! interpreter,
Jeff Stroomer<=