What happens when you grep the file you've redirected grep to?
Reminds me of how easy it is to destroy a file with sed:<p><pre><code>  sed 's/a/b/' test.txt > test.txt
</code></pre>
After that command the file is empty no matter what was in there before. Instead you have to use the -i flag like:<p><pre><code>  sed 's/a/b/' -i test.txt
</code></pre>
And different operating systems seem to behave differently:<p><a href="https://stackoverflow.com/questions/5171901/sed-command-find-and-replace-in-file-and-overwrite-file-doesnt-work-it-empties" rel="nofollow">https://stackoverflow.com/questions/5171901/sed-command-find...</a>