Here is my 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 > report.txt
When I execute it I get the following error:
BEGIN blocks must have an action part
My BEGIN block has a print statement so it has an action part. What am I missing here?