String formatting using awk printf

Hi Friends,
I am trying to insert lines of the below format in a file:

# x3a4914       Joe       2010/04/07
# seh          Lane       2010/04/07
# IN01379     Larry       2010/04/07 

I am formatting the strings as follows using awk printf:

awk 'printf "# %s %9s %18s\n", $2,$3,$4}'

The above code does not work when the length of feild 1 varies.
Example, I get results as shown below:

# x3a4914       Joe       2010/04/07
# seh      Lane       2010/04/07
# IN01379     Larry       2010/04/07

Please let me know how to modify the prinf in awk to achieve this.

Thanks,
Sugan

set the width of first field to some max.
eg.

awk '{printf "# %10-s %9s %18s\n", $2,$3,$4}'

Please try.

Ya, its working fine. Thanks