title: Paste columns side by side on many files using awk
body: <p>I've been struggling for quite a while on this problem (please note I'm not a really good bash coder, let alone awk). 
  I have about 10000 files, each formated the same way (quite heavy as well, about 3Mb). I would like to get the 3rd row of each file and paste them side by side on a new file.</p>
  
  <p>I found many solutions using paste, awk, or cut, but none of them worked when working with wildcards. For instance,</p>
  
  <pre><code>paste &lt;(awk '{print $3}' file1 ) &lt;(awk '{print $3}' file2 ) &lt;(awk '{print $3}' file3) &gt; output
  </code></pre>
  
  <p>would work great if I only had 3 files, but I won't type that for 10000 of them. So I gave it a try with wildcards:</p>
  
  <pre><code>paste &lt;(awk '{print $3}' file* ) &gt; output
  </code></pre>
  
  <p>And it does paste the 3rd rows, but in a single line. I tried some other codes, but eventually always end up with the same result. Is there a way to paste them side by side using wildcards?</p>
  
  <p>Thank you very much for your help!</p>
  
  <p>Baptiste G.</p>
  
  <blockquote>
    <p>EDIT 1: With the help of schorsch312, I found a solution that works
    for me. Instead of getting the columns and pasting them side by side,
    I print each columns as a line and add them one after the other:</p>
    
    <p>for i in <code>ls files*</code>; do
           awk '{printf $3i" "}END{print}' $i >> output done</p>
    
    <p>It works but 1/ it's quite slow, and 2/ it's not exactly what I asked
    in the title, as my output files is the "transpose". It doesn't really
    matter to me because it's only floats and I can transpose it later
    with python if needed.</p>
  </blockquote>