# Pastebin 3nTd6UeF : def proc = 'tail -n 10000 /opt/jira/logs/catalina.out'.execute() proc.consumeProcessOutput(sout, serr) proc.waitForOrKill(1000) "out> $sout err> $serr"