Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OlegSmelov/ba32eb56f2d8fb27cb3c759b9dfe907f to your computer and use it in GitHub Desktop.
Save OlegSmelov/ba32eb56f2d8fb27cb3c759b9dfe907f to your computer and use it in GitHub Desktop.
Groovy shell command
def command = [
"sh",
"-c",
"shell command"
]
def proc = command.execute()
proc.waitFor()
println "Process exit code: ${proc.exitValue()}"
println "Std Err: ${proc.err.text}"
println "Std Out: ${proc.in.text}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment