title: split a string delimited by a string in bash
body: <p>I'm trying to split a string of this kind :</p>
  
  <pre><code>file1 -&gt; file2
  </code></pre>
  
  <p>and expect to affect "file1" and "file2" to 2 variables.</p>
  
  <p>I tried with IFS but it seems to work only for one character long (with IFS=" -> " I get "file1" and "> file2"...</p>
  
  <p>Based on <a href="http://www.humbug.in/2010/bash-tricks-split-cut-a-string-with-multi-character-delimiters-using-awk/" rel="nofollow">this article</a>, I tried another approach :</p>
  
  <pre><code>awk 'BEGIN {FS=" -&gt; "} {xxx}' &lt;&lt;&lt; $f
  </code></pre>
  
  <p>The issue is that I don't succeed to affect $1 and $2 to a variable that I could use later...</p>