title: BASH shell use regex to get value from file into a parameter
body: <p>I've got a file that I need to get a piece of text from using regex. We'll call the file <code>x.txt</code>. What I would like to do is open <code>x.txt</code>, extract the regex match from the file and set that into a parameter. Can anyone give me some pointers on this?</p>
  
  <h3>EDIT</h3>
  
  <p>So in <code>x.txt</code> I have the following line</p>
  
  <pre><code>$variable = '1.2.3';
  </code></pre>
  
  <p>I need to extract the <code>1.2.3</code> from the file into my bash script to then use for a zip file</p>