Groovy

Using Groovy

Language Guide

Groovy Features

Modules

Examples

Useful Links

IDE Support

Support

Community

Developers

Tools we use

IntelliJ IDEA
YourKit profiler

Feeds


Site
News
Process

Groosh, for Groovy Shell, is a shell à la unix written in groovy.


An example :

gsh = new com.baulsupp.groovy.groosh.Groosh();

c = gsh.cat('test_scripts/blah.txt').toStdOut();

Another example :

gsh = new com.baulsupp.groovy.groosh.Groosh();

f = gsh.find('.', '-name', '*.java', '-ls');
total = 0;
lines = gsh.grid { values,w |
  x = values[2,4,6,10]; 
  s = x.join('	');
  w.println(s);
  total += Integer.parseInt(values[6]);
};

f.pipeTo(lines);
lines.toStdOut();

System.out.println("Total: " + total);