Thanks for the -ww tip. Now I see the entire line wrapped, but depending on the window size, the same problem still exists with -ww. Although it does show the entire line (wrappped), if the window has a size that happens to cause the word you're searching for to split between the lines, then the code doesn't find it because your search word has a \n in it not matching the grep. Rather than doing a foreach, I'll get rid of the \ns, and do a search for the string from the entire result, rather than going line by line. That should work (will update either way).