title: How to combine two commands in -exec parameter of find?
body: <p>I have this find command to get all the files modified in the last 50 seconds which matchs with the following regex <code>hell\d</code> in the last 1000 characters.
  I use tail to get the last 1000 chars in order to speed up the search becouse the files to check are huge (3gb on average).</p>
  
  <pre><code>find /home/ouhma -newermt '50 seconds' -type f |
  while read fic; do
      if tail -c 1000 "${fic}" | LANG=C LC_ALL=C grep -Pq 'hell\d'; then
          echo "${fic}"
      fi
  done
  </code></pre>
  
  <p>It is posible to use <code>-exec</code> parameter to replace that ugly loop and to retrieve the result even faster? </p>
  
  <p>This works, but I dont know if its the best way to do it:</p>
  
  <pre><code>find /home/ouhma -newermt '50 seconds' -type f -exec bash -c 'LANG=C LC_ALL=C grep -Pq "hell\d" &lt;(tail -c 1000 "{}") &amp;&amp; echo "{}"' \;
  </code></pre>