Forum Discussion
Mosh
Professor
7 years ago
A workaround using the !groovy command:
def sout = new StringBuilder();
def serr = new StringBuilder();
// Shell command for your OS
def proc = 'cmd.exe /c tracert www.google.com'.execute();
proc.consumeProcessOutput(sout, serr);
// Adjust timeout as needed
proc.waitForOrKill(20 * 1000);
println "out> $sout err> $serr"
Related Content
- 7 months ago