Hi everybody,
I thought that any executable could be specified on the shebang line,
but when I try it, I can only use binaries. For example:
chewie ~ $ cat a.cat
#!/bin/cat
a_one
a_two
a_three
chewie ~ $ ./a.cat
#!/bin/cat
a_one
a_two
a_three
Above is as expected. Below is what happens when I try to use a.cat in
the shebang line of b.a:
chewie ~ $ cat b.a
#!/home/sysops/kor/a.cat
b_one
b_two
b_three
chewie ~ $ ./b.a
./b.a: b_one: command not found
./b.a: b_two: command not found
./b.a: b_three: command not found
For some reason that I can't see, it's trying to execute each of the
lines in b.a using the interpreter given in a.cat, instead of using
a.cat itself as an interpreter (which is what I'm trying to do).
Now, the more I look at this I the more I think I shouldn't be doing
it, but if anyone can see why this behaviour is occurring, or even how
to get the desired behaviour, then I'd be thrilled.
cheers
-kev
--
No one pretends that democracy is perfect or all-wise. Indeed, it
has been said that democracy is the worst form of government except
all those other forms that have been tried from time to time.
-Winston Churchill
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!