title: How do I replace a string with a newline using a bash script and sed?
body: <p>I have the following input:</p>
  
  <pre><code>Value1|Value2|Value3|Value4@@ Value5|Value6|Value7|Value8@@ Value9|etc...
  </code></pre>
  
  <p>In my bash script I would like to replace the <code>@@ </code> with a newline. I have tried various things with sed but I'm not having any luck:</p>
  
  <pre><code>line=$(echo ${x} | sed -e $'s/@@ /\\\n/g')
  </code></pre>
  
  <p>Ultimately I need to parse this whole input into rows and values.  Maybe I am going about it wrong.  I was planning to replace the <code>@@ </code> with newlines and then loop through the input with setting <code>IFS='|'</code> to split up the values.  If there is a better way please tell me, I am still a beginner with shell scripting.</p>