awk ?

I need to use awk as a front end to a small database I am building to return results of a limited query. The syntax will be simple and will start by running a shell script and then passing variables to awk inside the shell script. I need to pass the field number to extract data from to awk as in: awk '{print ${$1}}' <filename>
It returns an error in which it is telling me it doesn't tolerate the indirection I am using here.
The whole story is the shell script is executed and a number is passed to it referring to the field number I want to extract data from. The shell script is invoked and a number is passed to indicate the field number to get. For example, "./srch 3" should get the third field's data and return it. By inserting "echo $1" before the awk command I can see it is getting the parameter inside the shell script but awk doesn't like the extra braces. Is the another way of doing this?

Thanks in advance for your time!

Robert Pollard

I just figured out the way to do this. I can't believe it was this easy.
The answer:
awk '{print $'$1'}' <filename>

This concatenates the first part '{print $' to the variable $1 and then the rest of the statement '}' to form the whole statement.