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.
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/.