alignment in shell script

grep 'Dept' x.lst |awk -F"Name=" `{print $1" "$2" "$3}`

the output is coming like this

       Krishna         1   2340   8383
       Rohan           10 982  234

how can I align these numbers using shell script.
even i used typeset but it is useful for only zero-when-blank.

if any one knows how to do please maily me : kkodava@maxis.com.my

thanks

krishna

You can use printf instead of print which supports C style output fromatting.

ex:
grep 'Dept' x.lst |awk -F"Name=" '{printf (" %-25s %-10s %-15s \n",$1,$2, $3) }'

>if any one knows how to do please maily me : kkodava@maxis.com.my

Why? You posted your question here. Right? So the answer also goes here. Maybe lot of other peoples benefit from it. And this gives an oppertunity to other peoples to add more info or *correct* what I have said. For a lot of us, IMHO, this is how we learn things.

Thanks