title: TCL - read file column
body: <p>I am trying to just put column 1 from the infile to the outfile but I am getting the whole line (outfile). How do I just put 1st column into the outfile?</p>
  <p>Infile:</p>
  <pre><code>Game1_1000   2002.1111 1000.1111
  Game2_20001  1111.2222 1122.2222
  Game3_2222   1111.3333 1111.2221
  </code></pre>
  <hr />
  <p>Current Outfile: (not what I wanted)</p>
  <pre><code>baseball Game1_1000 2002.1111 1000.1111
  baseball Game2_20001  1111.2222 1122.2222
  baseball Game3_2222   1111.3333 1111.2221
  </code></pre>
  <hr />
  <p>I want the outfile to be like below:</p>
  <pre><code>baseball Game1_1000
  baseball Game2_20001
  baseball Game3_2222 
  </code></pre>
  <p>Here is my script:</p>
  <pre><code>set infile [open &quot;infile.txt&quot; r]
  set outfile [open &quot;outfile.txt&quot; w]
  
  set lines [split [read -nonewline $infile] &quot;\n&quot;]
  foreach line $lines {
      puts $outfile &quot;Baseball&quot;
  }
  </code></pre>