Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
groovy can be invoked passing a script via the -e param, e.g.
$ groovy -e 'print 1+1'
2
groovy can also run a script file that is passed as positional argument:
$ groovy foo.groovy
Hello World
For some reason, groovysh has no -e option, but allos passing a script as positional argument. However, when passing this, groovysh evaluates and then shuts down, seemingly without benefit over the groovy -e command.
Also see this discussion (from 2010): http://groovy.329449.n5.nabble.com/groovy-equivalent-to-quot-python-i-lt-script-py-gt-quot-td372587.html
So i suggest to make groovysh parameters consistent with the groovy command, but that groovysh does not terminate after evaluation.