Posted By

narkisr on 04/17/09


Tagged

external groovy process gstring


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

laurenceosx


Running an external process from a GString


 / Published in: Groovy
 

An easy way to launch an external process (http://docs.codehaus.org/display/GroovyJSR/Run+Sub-Process+Safely).

  1. proc = "ls -al".execute()
  2. println(proc.in.text)
  3. println(proc.returnCode())

Report this snippet  

You need to login to post a comment.