03-17-06 10:54 PM
Sal wrote:
> Hi all,
>
> I have the following table
>
>
>
> DesiredCPU DesiredMEM MaxCPU MaxMEM MinCPU MinMEM
> 2 6144 4 6144 1
> 3072
> 2 6144 4 6144 1
> 3072
>
> What I need is to have first
>
> MinCPU Desired CPU MaxCPU MinMEM DesiredMEM MaxMEM
>
>
> Any advice how to do it.
>
> Regards
>
Simplest sulution is output separated by spaces...
awk '{print $5,$1,$3,$6,$2,$4}'
or optionally specify some fixed output field separator (OFS)
awk 'BEGIN{OFS="\t"}{print $5,$1,$3,$6,$2,$4}'
or if you want individually formatted column widths, e.g.
awk '{printf("%16s%12s%12s%15s%10s%12s\n",$5,$1,$3,$6,$2,$4)}'
Janis
[ Post a follow-up to this message ]
|