Ko-Chih Wu
Ko-Chih Wu

Reputation: 692

How to make groovysh enter interactive mode after executing scripts?

Python has an option to enter interactive mode after executing scripts:

$ python -i util.py
>>>

I found this article groovy equivalent to "python -i "? but nothing seems to work for groovysh 2.3.0. Is there a way to do that?

Upvotes: 2

Views: 856

Answers (1)

Paweł Piecyk
Paweł Piecyk

Reputation: 2789

Do you need to execute this with one command only? If not, try executing groovysh first:

$ groovysh

then in groovysh:

groovy:000> :load your_script.groovy

Upvotes: 4

Related Questions