title: Running an awk by splitting the lines
body: <p>This is such a basic question in awk . But I am facing issues in this and I dont know why. problem is when I run the awk command in a single line such as </p>
  
  <pre><code>awk 'BEGIN {} {print $0;}' FILE 
  </code></pre>
  
  <p>Then the code is running perfecctly</p>
  
  <p>But if I split the code between lines such as </p>
  
  <pre><code> awk '
   BEGIN
   {
   }
   {
        print $0;
   }' FILE
  </code></pre>
  
  <p>It gives me an error stating that <strong>BEGIN should have an action part</strong> . I was wondering since it is the same code that I am formatting, why am I getting this error. Its really important for me to solve this as I would be writting large lines of codes in awk it would be difficult for me to format and bring it in a single line everytime. Could you ppl please help me regarding this. Thank you. Note. I am running this awk in shell environment</p>