extra characters after \ at the end of a command
<p>When I try to insert new line in OSX using sed I'm getting the below error</p>

<blockquote>
  <p>extra characters after \ at the end of a command</p>
</blockquote>

<p>Current File content is</p>

<pre><code>{
'localhost' =&gt; ['domain_name' =&gt; 'default', 'domain_type' =&gt; 'mobile'],
}
</code></pre>

<p>Expected content is</p>

<pre><code>{
'localhost' =&gt; ['domain_name' =&gt; 'default', 'domain_type' =&gt; 'mobile'],
 'dev.ops' =&gt; ['domain_name' =&gt; 'default', 'domain_type' =&gt; 'mobile'],
}
</code></pre>

<p>The command I'm using is</p>

<pre><code>sed -i '' "/localhost/a\                        'dev.ops' =&gt; ['domain_name' =&gt; 'default', 'domain_type' =&gt; 'web']," FILENAME
</code></pre>