Make awk interpret one line at a time from variable <p>I'm a completely new to shell scripting and bash. My question is how do I get awk to interpret a variable which contains linebreaks the same way as awk interpret the data from stdin?</p> <p>Example:</p> <pre><code>fileData=`cat /path/to/file` echo $fileData | awk '{print $1}' </code></pre> <p>The code above results in the following error message: <code>awk: program limit exceeded: maximum number of fields size=32767</code> which obviously means that awk interprets all the lines in <code>$fileData</code> at the same time and not one line at a time.</p> <p>How to make awk interpret one line at a time from a variable?</p>