Funny grep situation <p>I have 99999 XML-files which I presume all contain the tag <code>"&lt;A_ItemKey&gt;"</code>.</p> <p>When I run this command:</p> <pre><code>cat *.xml | grep "&lt;A_ItemKey&gt;" | wc -l </code></pre> <p>I get the result 75140</p> <p>However if I run this command:</p> <pre><code>grep "&lt;A_ItemKey&gt;" *.xml | wc -l </code></pre> <p>I get the result 99999 (which I believe is correct).</p> <p>Why don't these two commands show the same results?</p> <p>Many thanks in advance:-)</p> <p>/Paul</p>