Created
July 2, 2024 12:59
-
-
Save caarmen/9ff56171924e785a298017d8b7f1b89d to your computer and use it in GitHub Desktop.
groovy 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
command="ls -la" | |
process=command.execute() | |
process.waitFor() | |
def output = process.in.text | |
println "Output:\n$output" | |
def error = process.err.text | |
println "Error:\n$error" | |
def exitCode = process.exitValue() | |
println "Exit Code: $exitCode" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment