Here goes another unconventional way of passing variables to awk:
Code:
echo "Enter month: "
read MONTH
awk '/'$MONTH'/ { print ... }' file
Caveat emptor:
The above approach
does not work if the variable has whitespaces, newlines or certain special characters ( |, /, ...) in it.
So it's always recommended using the conventional way
-v var=... .