title: grep in a directory and return just 1 result for each file in Unix Shell scripting
body: <p>I'm trying to grep into a directory which has a couple of files, I'm trying to grep by IP address, my problem is, in a single file the ip address is repeated at least 3 or 4 times, and I just want to get 1 result and continue with the grep in the other file</p>
  
  <p>This is what I'm trying to do and I don't have any luck with it.</p>
  
  <pre><code>grep 10.01.10.0 log/MY_DIRECTORY_FILES* | sort -t . -k 2 | head -1
  </code></pre>
  
  <p>This is just returning 1 result.</p>