title: Awk removing all blank lines in a script (not with command line)
body: <p>I am converting a csv file into a pdf using LaTeX. My awk script looks like this:</p>
  
  <pre><code>BEGIN {printf "\\documentclass[a4paper,notitlepage]{report}\n" \
  "\\usepackage[utf8]{inputenc}\n"\
  "\\usepackage[francais]{babel}\n"\
  "\\usepackage[T1]{fontenc}\n"\
  "\\usepackage{hyperref}\n"\
  "\\usepackage{textcomp}\n"\
  "\\usepackage[left=1cm]{geometry}\n"\
  ..........
  {print $1"\n" \
  $2"\n" \
  $3"\n" \
  $4"\t"\
  $5"\t" \
  $6"\t" \
  $7"\t" \
  $8"\t" \
  $9"\t" \
  $10"\n""\\linebreak" \
  ......
  $39"\t"\
  $40;}
  
  END {print "\\end{document}";}
  </code></pre>
  
  <p>I have found various flavors of commands to remove blank lines in the command line (awk 'NF', awk '$0!~/^$/ {print $0}') and tried to incorporate them at the end of the script with various combinations of BEGIN and END statements but nothing works.</p>
  
  <p>Could anyone help? Thank you very much in advance...</p>