title: How can you store a specific line from a file in an array in Groovy?
body: <p>I am interested if there is a easy way to store a specific line from a file into an array in Groovy (i need it for GroovyAxis in Jenkins). The file would look like this:</p>
  
  <pre><code>var1="value1 value2 etc"
  
  var2="a b etc"
  
  var3="test1 test2 test3 etc"
  </code></pre>
  
  <p>I would need test1 test2 test3 etc from var3 to be stored in an array. Right now i use this: </p>
  
  <pre><code>def words = []
  new File( '/home/workstation/jenkins/params' ).eachLine { line -&gt;
      words &lt;&lt; line
  }
  </code></pre>
  
  <p>But it stores each line i have into an array, so i have to heavily workaround the config file to get the job done.</p>
  
  <p>Thank you very much</p>