title: Redirecting printf to file in awk
body: <p>I have a simple bash script.</p>
  
  <p>It's purpose is to monitor http access log file (test.log) and output to a file (out.log) the updated hit rate:</p>
  
  <pre><code>  stdbuf -o0 tail -f test.log | awk -F'[ "]+' '{
    ipcount[$1]++;
    print "test" &gt; "out.log"; #Truncate out.log
    for (i in ipcount) {
          printf "%15s - %d\n", i, ipcount[i] &gt;&gt; "out.log";
          printf "%15s - %d\n", i, ipcount[i] }
  }'
  </code></pre>
  
  <p>The main logic works. my only problem is the redirection to "out.log" that doesn't seem to work.
  The last printf outputs the expected result to the standard output.
  But the other two printf do not output anything to "out.log", and I cannot figure out why.
  out.log has all permissions (777)</p>