Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- println "ls".execute().text
- def x = shellDo("ls /tmp/NoFile")
- println "out: ${x.out} err:${x.err}"
- def sout = new StringBuffer(), serr = new StringBuffer()
- def proc = 'ls /badDir'.execute()
- proc.consumeProcessOutput(sout, serr)
- proc.waitForOrKill(1000)
- println "out> $sout err> $serr"
- def proc = "ls".execute()
- def b = new StringBuffer()
- proc.consumeProcessErrorStream(b)
- println proc.text
- println b.toString()
Add Comment
Please, Sign In to add comment