Print filename and columns with awk
<p>I would like to select the column 23,24 and 27 of the 8th row. </p>

<p>Here is the way I have tried. </p>

<pre><code>awk 'FNR == 8 {print $23,$24,$37}' file.txt
</code></pre>

<p>It works perfectly. 
However, I'm wondering how to add the corresponding file name as the $0</p>

<p>Then, the output should look like</p>

<pre><code>file.txt colunm23 colunm24 colunm 27     &lt;---- The 8th row.    
</code></pre>

<p>I'm not using gawk. Please suggest based on the version before gawk 4.0.0
Thank you. </p>