Command param subst to reg expression

I want to find out Row which starts with, the user specified details to a script.
In general I know what command to be given.
awk '$0~/^Vi/' BReject

But I need to pass on $1 param of command line at the place of 'Vi'.
I tried with -v subst=$1
awk -v subst=$1 '$0~/^subst/' BReject
But it couldnt work.

Any suggestions, Solution must be restricted to awk.

12345

You would if you would read our faqs or at least the one entitled "Passing variables/arguments/parameters to commands".

Druuna

It doesnt work. Requirement is it should start with the given pattern.
Actually I have a fixed width file. So there is no fields within.
Its true I need suitable replacement for var within, /^var/.

It worked with me for , at the place of var, '$1'.

Thanks.

i try some thing like this ......

awk -v subst="bhargav" '{ if(match($0,subst) == 1 ){ print $0 } }' txt.tmp