title: TCL logging - unwanted lines in the log file
body: <p>Here you can see an output of "cat tcl.log":</p>
  
  <pre><code>Discovered serial numbers for slot 1 olt 1:
  sernoID   Vendor  Serial Number     sernoID   Vendor  Serial Number
     5      ZNTS    032902A6 
  </code></pre>
  
  <p>And that's how it looks in VIM:</p>
  
  <pre><code>^MDiscovered serial numbers for slot 1 olt 1:
  ^MsernoID   Vendor  Serial Number     sernoID   Vendor  Serial Number
  ^M&lt;SPACE&gt; for next page, &lt;CR&gt; for next line, A for all, Q to quit^H ^H^H ^H^...
     5      ZNTS    032902A6
  </code></pre>
  
  <p>I don't mind the ^M and ^H characters, I know how to get rid of them. The problem is that for some reason my C++ program (unlike cat) is seeing the line starting with "&lt; SPACE >". What can I do about it? I'm using the fstream library to read the log file and I want it to ignore the line I mentioned. I tried to do something like this:</p>
  
  <pre><code>std::ofstream logFinal("logFinal");
  std::ifstream log("tcl.log");
  std::string temp;
  while (std::getline(log, temp)){
      if (temp.find("SPACE") != std::string::npos){
          temp = "";
      }
      logFinal &lt;&lt; temp &lt;&lt; std::endl;
  }
  </code></pre>
  
  <p>But for some reason it doesn't find any "SPACE" in the temp variable. It looks like the "&lt; SPACE >" is some kind of a special character of which I've never heard about.</p>