[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash sometimes can't find #! interpreter
From: |
Jeff Stroomer |
Subject: |
bash sometimes can't find #! interpreter |
Date: |
Sun, 09 Mar 2003 13:08:43 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130 |
Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: cygwin
Compiler: i686-pc-cygwin-gcc
Compilation CFLAGS: -DPROGRAM='bash.exe' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='cygwin' -DCONF_MACHTYPE='i686-pc-cygwin'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -DRECYCLES_PIDS -I.
-I../bash-2.05b -I../bash-2.05b/include -I../bash-2.05b/lib -g -O2
uname output: CYGWIN_NT-5.1 xcostroomer20 1.3.20(0.73/3/2) 2003-02-08
12:10 i686 unknown unknown Cygwin
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 <=