Introducción

Posiblemente la forma mas rápida de ejecutar groovy sea proveer el programa en la línea de comandos:
casiano@tonga:~$ groovy -e "println 'Hello ' + args[0]" World
Hello World
Sin embargo, la shell groovysh permite la experimentación con groovy. Comencemos:

casiano@tonga:~/src/groovy$ groovysh 
Groovy Shell (, JVM: 1.6.0_0-b11)
Type 'help' or '\h' for help.
-----------------------------------------------------------------------------------------------------------------------------------------------------
groovy:000> \h

For information about Groovy, visit:
    http://groovy.codehaus.org 

Available commands:
  help     (\h) Display this help message
  ?        (\?) Alias to: help
  exit     (\x) Exit the shell
  quit     (\q) Alias to: exit
  import   (\i) Import a class into the namespace
  display  (\d) Display the current buffer
  clear    (\c) Clear the buffer
  show     (\S) Show variables, classes or imports
  inspect  (\n) Inspect a variable or the last result with the GUI object browser
  purge    (\p) Purge variables, classes, imports or preferences
  edit     (\e) Edit the current buffer
  load     (\l) Load a file or URL into the buffer
  .        (\.) Alias to: load
  save     (\s) Save the current buffer to a file
  record   (\r) Record the current session to a file
  history  (\H) Display, manage and recall edit-line history
  alias    (\a) Create an alias
  set      (\=) Set (or list) preferences

For help on a specific command type:
    help command 

groovy:000>
Podemos pedir ayuda sobre un comando específico:
groovy:000> help show

usage: show [<variables|classes|imports|preferences|all>]

Show variables, classes, imports or preferences.



Casiano Rodríguez León
2010-04-30