title: SED command error on MACOS X
body: <p>I am trying to run this command on MacOSX terminal , which was initially intended to run on Linux</p>
  
  <pre><code>sed '1 i VISPATH=/mnt/local/gdrive/public/3DVis' init.txt &gt;&gt; ~/.bash_profile
  </code></pre>
  
  <p>but it gives me the error:</p>
  
  <pre><code>command i expects \ followed by text. 
  </code></pre>
  
  <p>is there any way I could modify the above command to work on MacOSX terminal </p>