title: Bash: How do I "grep" output of ls -la matching file owner and file permissions?
body: <p>Hi I'm working on a simple script that recieves a directory ex:"/var/www/" a user ex:"usr" and some permissions ex:"drwxr-xr-x" and has to show only the files/folders inside the directory owned by the selected user and only with the desired permissions. At the moment I'm doing something like:</p>
  
  <p>where <code>$p</code> are perms and <code>$n</code> user</p>
  
  <pre><code>ls -alis "$d | grep $p | grep "$n" 
  </code></pre>
  
  <p>where <code>$p</code> are perms and <code>$n</code> user</p>
  
  <p>I know this is not the way to do it. How can it be done making sure it matches exactly with user and perms?</p>
  
  <p><strong>PD: I want to avoid using "find"</strong></p>