title: Using awk for headings
body: <p>So I'm looking for some help with my headings for a text file.</p>
  
  <p>A sample data file:</p>
  
  <pre><code>$ cat filename.txt
  Consoling,ST,DWC,0900
  Scribing,RA,DWC,1000
  Gloater,AU,DWC,1100
  Crimp,DI,DWC,1200
  Moving,TI,DWC,1300
  Handbook,EN,EBS,0900
  Stifling,BA,EBS,1000
  Unclothed,CR,EBS,1100
  Until,IC,EBS,1200
  </code></pre>
  
  <p>This is the awk code that i have.</p>
  
  <pre><code>sort -t, -k3 -k4 filename.txt |
  column -ts, |
  awk ' { printf "%-8s %-2s %-3s %-3s\n" , "Family Name", "Initals", "Interviewer Initals", "Interview Time" }
  { printf "%-8s %-2s %-3s %3d\n", $1,$2,$3,$4 }
  '
  </code></pre>
  
  <p>Which is outputting like this </p>
  
  <pre><code>Family Name Initals Interviewer Initals Interview Time
  Consoling ST DWC 900
  Family Name Initals Interviewer Initals Interview Time
  Scribing RA DWC 1000
  Family Name Initals Interviewer Initals Interview Time
  Gloater  AU DWC 1100
  Family Name Initals Interviewer Initals Interview Time
  Crimp    DI DWC 1200
  Family Name Initals Interviewer Initals Interview Time
  Moving   TI DWC 1300
  Family Name Initals Interviewer Initals Interview Time
  Handbook EN EBS 900
  Family Name Initals Interviewer Initals Interview Time
  Stifling BA EBS 1000
  Family Name Initals Interviewer Initals Interview Time
  Unclothed CR EBS 1100
  Family Name Initals Interviewer Initals Interview Time
  Until    IC EBS 1200
  </code></pre>
  
  <p>But what i want it to look like is this.</p>
  
  <pre><code>Family Name Initals Interviewer Initals Interview Time
  
  Consoling   ST      DWC                 0900
  Scribing    RA      DWC                 1000
  Gloater     AU      DWC                 1100
  Crimp       DI      DWC                 1200
  Moving      TI      DWC                 1300
  
  Handbook    EN      EBS                 0900
  Stifling    BA      EBS                 1000
  Unclothed   CR      EBS                 1100
  Until       IC      EBS                 1200
  </code></pre>
  
  <p>Does anyone know what i would have to change? Thanks</p>