且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

正从蚂蚁合式输出 - sshexec在Groovy脚本

更新时间:2023-12-05 20:22:34

您可以保存Ant属性里面的原始输出:

You can save the raw output inside an Ant property:

def ant = new AntBuilder()
ant.sshexec(host: host,
            port: port,
            trust: true,
            username: username,
            password: password,
            command: 'ls',
            outputproperty: 'result')

def result = ant.project.properties.'result'