awk conditional expression to compare field number and variable value

Hi,

I'm trying to compare the value in a field to the value in a variable using awk. This works:

awk '$7 == "101"'

but this is what I want (and it doesn't work):

value=101
awk '$7 == "$value"'

Any help or insight on this would be great. Thanks in advance.

Try this,

value=101
awk '$7 == '$value'' inputfile

OR

awk -v value=101 '$7==value' inputfile