Getting started with Groovy

 

Running shell inside groovy

def sout = new StringBuilder(), serr = new StringBuilder()
def proc = 'du -s ./workspace/'.execute()
proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "out> $sout err> $serr"

 

Links:

https://github.com/wagoodman/dive 

Leave a Reply

Your email address will not be published. Required fields are marked *