title: How to redirect the telnet console logs to a file Linux
body: <p>I want to redirect the telnet console logs to a file in Linux.</p>
  <p>For example:</p>
  <pre><code>telnet $someIp &gt; someFile
  #ls
  #exit
  </code></pre>
  <p>I want the console logs to be saved in the filename <code>someFile</code>. I am using <code>tcl</code> for automating this. As of now, I am doing <code>spawn telnet $someIp</code> in <code>tcl</code>.</p>
  <p>This will not capture the console logs and save it to a file.</p>
  <p>Can this be done?</p>