how to align report headers in awk

Is it any way exept playing with spaces (tabs don't help)

Have a look at the printf command in awk - that way, you can align headers and output the way you like it.

Cheers
ZB

I only see tabs in printf command and it doesn't help. Can somebody give me an example?

You could do it something like this:, and pipe your report through it.

#! /bin/nawk -f

BEGIN{
           maxf = 0
}
{
           for(i=0;i<=NF;i++){
                     arr[NR,i] = $i
                     if ( NF > maxf ) maxf = NF
                     if ( length($i) > maxl ) maxl = length($i)
           }
}
END{
           for(x=0;x<=NR;x++){
                     for(y=0;y<=maxf;y++){
                               printf("%-"maxl[y]"s ", arr[x,y])
                     }
                     printf("\n")
           }
}