您可以使用.text 获取整个输出流:
def process = "ls -l".execute() println "Found text ${process.text}"
是否有一个简洁的等价物来获取错误流?
groovy
groovy ×1