title: Loop through multiline string using awk scripting language
body: <p>I have a script it reads a string containing multiple lines. I need to loop through each line.</p>
  
  <p>eg:</p>
  
  <p>file <code>awktest</code></p>
  
  <pre><code>#!/bin/awk -f
  
  BEGIN {
  
      LINES = "line1\nline2\nline3\n";
  
      while ( LINES ) {
          print line;
      }
  
      exit 1;
  }
  </code></pre>
  
  <p>I've tried everything. This is my last resort. Thanks for any help.</p>