[NCLUG] Shell scripts
Tkil
tkil at scrye.com
Tue Jun 18 20:51:19 MDT 2002
>>>>> "Idris" == Idris S Hamid <Idris> writes:
Idris> bash: : bad interpreter: Permission denied
This usually happens because the #! line is bad ... but yours looks
fine. You can test this by using simpler commands inside a shell
script, to make sure that you can work at that level, at least.
Something like:
#!/bin/bash
echo "hi mom"
Then, you have to look at each program you're calling inside the
script, and see how many of them are scripts themselves; I know that
texexec is, and I think that acroread is typically a script as well.
Make sure that all of them have sane #! lines, and that the required
interpreters (perl for texexec, sh for acroread) are installed and
executable by you.
Other routes to pursue:
1. Use the "-x" argument to bash, and any child scripts. Sometimes
helpful.
2. Use strace to see what the system is trying to do, and where it's
failing. You will probably have to specify the "follow" flag
(which I've forgotten exactly what it is), so that you get a trace
of all the child processes, too. Look for persistent "ENOENT" or
"EPERM" type errors.
The "permission denied" in the error message leads me to agree with
Willy; you're trying (perhaps indirectly) to use an interpreter that
you don't have sufficient privileges to execute.
Finally, make sure you don't have extra CRs on the #! lines; that can
confuse the issue...
Good luck,
t.
More information about the NCLUG
mailing list