Sorry if the question statement wasn't very clear.
I'd like to have a bash script that I can edit to change the behavior of a bunch of other scripts.
For instance--I have some groovy scripts. they can be run either with the groovy interpreter "groovy" or with a special runner called "groovyclient". I might want to change which one runs it (Or do something completely different like compile them into Java class files and run them with Java)
So if I have an indirect script: /home/me/groovy/groovyrun, that is a shell script, it might look like this:
or like this:
I tried a #! line on the original scripts that looks like this:
and quickly realized that bash wasn't being invoked so it had no idea what to do with groovyrun
I then tried:
But now I think that the $*
That should run it but I believe it has issues with getting to the original argument list (The $* in the called script is probably wrong).
Now I'm fairly lost as far as how to do this and I figure it's probably a common pattern and I'm just not familiar enough with Linux to know it (or even know how to find it), so I ask.
I could easily solve it if I forgo the #! altogether and just pass the groovy script to a shell script directly, but what fun is that?