in reply to search match within flat text file

thanks for the help guys... turns out the code was working after all like grep suggested, I printed the results of the `cat $tmp` to troubleshoot it, and it was working fine. my problem was in another line of code. I was unsure if I could use "cat" with a scalar - vs- an array... but now I have a new question on the board! lol thanks again