Take a look at previous suggestion (of yongitz):
Quote:
|
awk -F"," -v pat=$SERIALNUM '$0 ~ pat {print $2,$3}' your_flat_file.txt
|
You need to specify a variable for use in awk, like done above. The -v says to set a variable, and the one assigned is pat, and it is equal to $SERIALNUM. You would need to do the same for your SRCHFOR variable. Then, you could use pat (or any other variable name you assign) within awk to do your matching.