title: "BEGIN blocks must have an action part" error in awk script
body: <p>Here is my code:</p>
  
  <pre><code>#!/bin/sh
  
  filename=$(/usr/bin/find -name "INSTANCE-*.log")
  echo "filename is " $filename
  
  awk '
   BEGIN
   {   
     print "Processing file: " filename 
   }
  
   {
    if($0 ~ /Starting/) 
    { 
      print "The bill import has been Started on "$1 " " $2
    }
  
  }'  $filename &gt; report.txt
  </code></pre>
  
  <p>When I execute it I get the following error:</p>
  
  <blockquote>
    <p>BEGIN blocks must have an action part</p>
  </blockquote>
  
  <p>My <code>BEGIN</code> block has a <code>print</code> statement so it has an action part. What am I missing here?</p>