Subject: Grouper Developers Forum
- From: "Redman, Chad" <>
- To: "" <>
- Subject: [grouper-dev] gsh script with arguments
- Date: Fri, 29 Mar 2019 13:57:46 +0000
Is it possible to run groovy gsh with a startup script that has arguments? It may just need to call the Groovy Shell constructor and bind the args as a variable.
I wanted to ask before filing a jira, in case there a history of beanshell running a different way. The groovy profile suggests that multiple command line parameters are to load multiple scripts in order. But it's only ever passed the first parameter, so it may not work as intended.
Even just a regular :load and passing parameters is challenging. This is the only way I know to get it to work:
def binding = new Binding()
binding.args = ["filename-placeholder", "a", "b", "c"]
def ret = new GroovyShell(binding).evaluate(new File("script.gsh"))
- [grouper-dev] gsh script with arguments, Redman, Chad, 03/29/2019
- RE: [grouper-dev] gsh script with arguments, Black, Carey M., 03/29/2019
Archive powered by MHonArc 2.6.19.