I\'m trying to write a Groovy script that wraps another command and am having trouble with the stdout/stderr order. My script is below:
#!/usr/bin/env groovy
Try putting System.out.flush after you do your println. If I am right, the messages are appearing in different orders because the System.out is being buffered.