title: How to get rid the weird characters in the output of the minicom?
body: <p>I am using the following command to log the data from minicom (serial port) with timestamp:</p>
  
  <pre><code>minicom -D /dev/ttyUSB0 -b 9600 | ( while read line; do echo "$(date +%Y%m%d:%H%M%S), ${line}"; done )| tee -a out.txt
  </code></pre>
  
  <p>The logged data in the out.txt file is:</p>
  
  <pre><code>20151006:145139, [20;47H [21;1H1 some data
  20151006:145140, [20;47H [21;1H2 some data
  20151006:145141, [20;47H [21;1H3 some data
  20151006:145142, [20;47H [21;1H4 some data
  20151006:145143, [20;47H [21;1H5 some data
  20151006:145144, [20;47H [21;1H6 some data
  </code></pre>
  
  <p>I thing that the weird characters "[20;47H [21;1H"are the carriage return and the line length, I want the output to be saved on the out.txt as in the following:</p>
  
  <pre><code>20151006:145139, 1 some data
  20151006:145140, 2 some data
  20151006:145141, 3 some data
  20151006:145142, 4 some data
  20151006:145143, 5 some data
  20151006:145144, 6 some data
  </code></pre>