title: Move column to last in awk
body: <p>I would like to move a specified column (the 2nd) to the last column position. 
  I have multiple large tab-delimited files containing variable numbers of columns and rows. But, column 2 in all needs to be last. Another way to put it is that I want the order to be 1,3-last,2.</p>
  
  <p>From this:</p>
  
  <pre><code>Column1 Column2 Column3 ... Column W ColumnX
  1 2 3 ... W X
  a b c ... apples oranges
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>1 3 ... W X 2
  a c ... apples oranges b
  </code></pre>
  
  <p>I'm newish to awk. From reading other threads, I've copied and tried various things like this with no success. </p>
  
  <pre><code>#doesn't reorder columns
  
  cut -d $'\t' -f1,3-,2 file.in &gt; file.out
  
  
  #doesn't work and I don't really understand the for(i...) stuff copied from elsewhere:
  cat file.in | awk -F'\t' '{print $1,for(i=3;i&lt;=NF;++i) $i,$2}' &gt; file.out
  </code></pre>
  
  <p>help? </p>
  
  <p>Any pointers to threads/links that explain in simple educational terms what's going on with the for(i...) part would be appreciated as well. I get the gist, not the syntax.</p>