title: how can we remove comma from specific column using sed
body: <p>The PSQL table values are </p>
  
  <pre><code>select * from A;
  
  2017-04-30 08:51:17.833084  A 12  Invalid digit, Value 'U', Pos 0, Type: Long                                                                                                                                                                                
  2017-04-30 08:51:17.833083  A 11  Invalid digit, Value 'U', Pos 0, Type: Long
  2017-04-30 08:51:17.833082  A 10  Invalid digit, Value 'U', Pos 0, Type: Long
  </code></pre>
  
  <p>The issue is when I tried to get this output to csv format like -o output.csv</p>
  
  <p>the last column value splitting to Invalid digit-4th column Value 'U'-- 5th column Pos 0 --6th column Type: Long --7 th column due to ',' char is there in the column. so i want to remove comma from last column
  my expected output is</p>
  
  <pre><code>col1                      col2 col3            col4
  2017-04-30 08:51:17.833084  A 12  Invalid digit Value 'U' Pos 0 Type: Long                                                                                                                                                                                
  2017-04-30 08:51:17.833083  A 11  Invalid digit Value 'U' Pos 0 Type: Long
  2017-04-30 08:51:17.833082  A 10  Invalid digit Value 'U' Pos 0 Type: Long
  </code></pre>
  
  <p>my command is:</p>
  
  <pre><code>"select * from values;" | sed -e "s/,/-/g"  &gt;&gt; outputfile.csv
  </code></pre>
  
  <p>but it changes all columns</p>