title: how to use print syntax in awk to write content into file in ksh
body: <pre><code>#!/bin/sh
  FILENAME=/test/test.txt
  awk -F, '
  { 
      printf("    Code %s  %\047d\n",$1,$2) &gt;&gt; $FILENAME
      r[NR] = $1
      c[NR] = $3here
  }
  END {
      for(i = 1; i &lt;= NR; i++) printf("  %s Record Count   %s\n", r[i],c[i]) &gt;&gt; $FILENAME
  }' totalsum.txt
  </code></pre>
  
  <p>am trying to route the result of awk to file., but its not getting writing into file.. is there is any mistake in that syntax.</p>