I am attempting to skip lines 1-6 in a file so that they are not parsed by my awk script. I attempted to use every variation of FNR and next that I could think of, however I couldn't get it to work. Below is my very basic awk script.
BEGIN{printf ("%-17s %-10s %-15s %-15s %-10s %-8s\n", "Policy", "Type", "Stg Uni
t", "Vol Pool", "Priority", "Active")}
{printf ("%-17s %-10s %-15s%-15s %-10s %-8s\n", $1, $2, $3, $4, $7, $8)}
I tried using some of the examples below as the first line in the script, but nothing has worked thus far.
{if (FNR<6) next}
{FNR==6}
Any help would be greatly appreciated.
Thanks,
John
BEGIN{printf ("%-17s %-10s %-15s %-15s %-10s %-8s\n", "Policy", "Type", "Stg Uni
t", "Vol Pool", "Priority", "Active")}
{printf ("%-17s %-10s %-15s%-15s %-10s %-8s\n", $1, $2, $3, $4, $7, $8)}
I tried using some of the examples below as the first line in the script, but nothing has worked thus far.
{if (FNR<6) next}
{FNR==6}
Any help would be greatly appreciated.
Thanks,
John