title: remove comma from last line
body: <p>How do I remove the comma from the last line of the file?
  Here is the file:</p>
  
  <pre><code># cat ox_data_archive_r_20120727.json
  {"name": "secondary_ua","type":"STRING"},
  {"name": "request_ip","type":"STRING"},
  {"name": "cb","type":"STRING"},
  </code></pre>
  
  <p>The following will remove the comma from all 3 lines.</p>
  
  <pre><code># sed 's/,$/\ /' ox_data_archive_r_20120727.json
  {"name": "secondary_ua","type":"STRING"}
  {"name": "request_ip","type":"STRING"}
  {"name": "cb","type":"STRING"}
  </code></pre>
  
  <p>I need to remove the last comma only. So the output should look something like this...</p>
  
  <pre><code># cat newfile.json
  {"name": "secondary_ua","type":"STRING"},
  {"name": "request_ip","type":"STRING"},
  {"name": "cb","type":"STRING"}
  </code></pre>