title: awk / sed how to add file with special characters to another file into certain line
body: <p>I have problem as written in the subject.
  The file under path /root/filetoadd has special characters as * &lt; > / and new lines. The file has around 20 lines.</p>
  
  <p>I want to add this file to another file under specific line.</p>
  
  <p>Here it is what I did unlit now.</p>
  
  <pre><code>linenumber=`awk -v line='&lt;xyz *&gt;' '$0 == line {print NR}' /etc/folders/filewithsomedata`  
  (this gives me line 162 thats correct, there I want to place another file) 
  content=`cat /root/filetoadd`
  sed -i "${linenumber} i \ ${content}" /etc/folders/filewithsomedata
  </code></pre>
  
  <p>The last line is giving me errors because how I mentioned above file contains special characters and new lines. Do you know how to add this file to keep original content with all those new lines and characters?</p>