2008年4月14日

Using Groovy from the command line

Using Groovy from the command line

$ groovysh "x=3; y=5; z=1; x * y + z"
===> 16

$ groovy -e "x=3; y=5; z=1; print x * y + z"
16

$ cat test.groovy
x=3
y=5
z=1
print x * y + z

$ groovy test
16

沒有留言:

網誌存檔