title: Find when tar find n matches using wildcards
body: <p>I'm trying to extract from a huge tar file some files from a list that are using wildcards. I'm using a loop to read the list but passing from one element in the list to the next one is taking too long, I'm guessing because is trying to match the element through the whole tar file. I want that after 2 matches for any element, the loop continues with the next one. </p>
  
  <pre><code>while read line;do
   tar --wildcards  -xzvf file.tar.gz "$line"
  done &lt;$file
  </code></pre>
  
  <p>And one line looks like this </p>
  
  <p><code>dataset/0113947.*</code></p>