Umieść wyjście GREP w pliku

grep -n "YOUR SEARCH STRING" * > output-file
Lovely Lark