title: how to print per column use awk
body: <p>the content of a.txt</p>
  <pre><code>name age
  alice 21
  ryan 30
  
  </code></pre>
  <pre><code>#test.sh
  nf=`awk '{print NF; exit}' a.txt`
  for((i=1;i&lt;=$nf;i++))
  {
      awk '{print $i}' ./a.txt
  }
  </code></pre>
  <p>The result I expected is print per column,but the actual result is print all content twice.</p>
  <p>my expected output is</p>
  <pre><code>name
  alice
  ryan
  age
  21
  30
  </code></pre>
  <p>actual output is</p>
  <pre><code>name age
  alice 21
  ryan 30
  name age
  alice 21
  ryan 30
  
  </code></pre>