Add file name and empty column to existing file in awk
<p>Dear all I would like to add to my existing file "file name" and "empty column" including their header in one awk step:</p>

<p>input:</p>

<pre><code>head1 head2 head3
value1 value2 value3
</code></pre>

<p>Ouptut:</p>

<pre><code>filename note head1 head2 head3
file1 empty_column value1 value2 value3
</code></pre>

<p>So I just add to header "Filename" and "Note". Under the Filename is the name of my file and under the note is empty field.</p>

<p>I can do this with two awk commands and paste it together, but is there way to do it in one-liner?</p>

<p>My idea was:</p>

<pre><code>awk -v OFS="\t" '{print FILENAME, $2="",$3 - end}' infile
</code></pre>

<p>But do not know how to add header and how to print moved fields (form position  $1 to $3). </p>

<p>Note: I have about 77 columns - not only three like in example.</p>

<p>Thank you for any ideas.</p>