How can I call cmd from Kotlin script and store re...
# scripting
i
How can I call cmd from Kotlin script and store result/output in the variable?
m
ProcessBuilder
?
You might want to read the output in a thread if it's very long, I'm not sure sure how big the buffer is. But that always worked for me...
p
(quite late to the party) I had a similar need but didn't really enjoy my time with ProcessBuilder, so I decided to open-source my solution: https://github.com/pgreze/kotlin-process
1
👍 2
🎉 2
y
That's a nice cleanup using your library. Thanks. https://github.com/yschimke/oksocial-output/pull/10
p
@yschimke you made my day 😍
👍 1