I have one groovy script which print some statistics: println: “…”
now I have another groovy script which needs this data. Is possible somehow run first script from second and save this data as paramater and then work with them from second script ? I just know how to run script: with GroovyShell() and then run(...) but this doesnt return output of first script
A few options:
stdout.groovy s1.groovy | groovy s2.groovyPersonally, when composing things that do stuff with stdin/stdio, I prefer the last method. Example:
s1.groovy
s2.groovy
Output