printf problem

I have the following code:

$ awk '{ printf "%-10s %s\n", $1, $2, $3, $4, $5, $5, $6 }' file
i can only print the first 2 elements ($1,$2). How can i print all the elements to appear like this:

aardvark 5555553 jhfjhfjkg efiigig ejkfjkej wjkdjk
alpo-net 5553412 skfjkfjk lekflkle qldfkf jekjfkfk
barfly 5557685 kdjkjkdkjk elkglklke lwjekfhke kwjkjffk
bites 5551675 elfklkflke elkglkglkg ejhfkejeh ejfhjehj
camelot 5550542 etc.... etc... etc.. etc..
....
....
ekfjekj 3874838 ejkfjkejk ejfkjekfk ekfjkefjk ekfjkejke

the columns supposed to be left-justify but i couldn't get it here..but the script prints them left-justify.The problem is that i have only the fist 2 columns:P

You should read the printf manual. :wink:

The shell version of printf is the only one I know of that cycles through the arguments if there are more than given in the format string. All others versions, including awk, require the number of specifiers to match the number of arguments:

awk '{printf "%-10s %s %s %s %s %s\n" $1, $2, $3, $4, $5, $5, $6}' file