title: background process in bash script/vi
body: <p>I have a question regarding adding a process to the background while in a bash script. I have a small script to test the speed of openvpn as if the server was a client. However openvpn likes to run in the foreground preventing any kind of extra commands to be run. </p>
  
  <p>Normally just doing it through the cmd line, I run:</p>
  
  <pre><code>$ (openvpn --config myconfig.opvn) &amp;
  </code></pre>
  
  <p>However in vi I try to do this and it doesn't work like it does on the cmd line.</p>
  
  <pre><code>connect () {
      (openvpn --config myconfig.opvn) &amp;;
      sleep 30;
      $speed --server 2426 | grep 'Download\|Upload' &gt; $log;
      killall openvpn;
  }
  </code></pre>
  
  <p>Is there a way to do this in vi so that it works like i want it to?</p>
  
  <p>Thank you.</p>