Created
August 29, 2017 18:39
-
-
Save pedroxs/8f5bd45c6e9d6811dd6f882f19eea854 to your computer and use it in GitHub Desktop.
Running shell commands with error redirection on Jenkins Script Console
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def cmd = "ls -l" | |
println new ProcessBuilder('sh','-c',cmd).redirectErrorStream(true).start().text |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment