The printf statement in awk does not requires parentheses. A correct form is
Code:
printf "%15s %5s","Name","PID"
Moreover you're not executing the printf statement in awk. You should do something like:
Code:
awk '
<awk statements here>
' filename
that is you can include an awk program inside a shell script, but you have to take care of the correct syntax, using single quotes to enclose the whole awk program. Anyway, you are using awk just to do a formatted printing, but the same task can be accomplished by the printf statement in bash, without the need for awk code.