title: Add new column in file using sed
body: <p>I am trying to add a new column in a file and using below command got from another Stack overflow post:</p>
  
  <pre><code>sed "s/$col/$col$FSEP$value/" $file &gt; ${file%.*}"_m.txt"
  </code></pre>
  
  <p><code>col=1</code> is column number, <code>value=20171231</code> is the  and <code>FSEP=|</code> is the field seperator. </p>
  
  <p>current data:</p>
  
  <pre><code>"01    "|"name "|"address "|" phone number"
  </code></pre>
  
  <p>current output:</p>
  
  <pre><code>"01|20171231    "|"name "|"address "|" phone number"
  </code></pre>
  
  <p>expected output:</p>
  
  <pre><code>"01" |"20171231    "|"name "|"address "|" phone number"
  </code></pre>
  
  <p>The <code>sed</code> is not considering double quotes well. How can I achieve that?</p>