title: How can I grep to filter results from ls?
body: <p>I have a problem with a grep command.
  I have 3 tasks:</p>
  
  <p>a) find and show only dir's for "ls -l"</p>
  
  <pre><code>ls -l | grep ^d   # which works good
  </code></pre>
  
  <p>b) only files which names starts with a digit</p>
  
  <pre><code>ls | grep ^[0-9] 
  </code></pre>
  
  <p>works too but for files and dirs,it have to work only for files, how can I do that?</p>
  
  <p>c) files that have a "x" right for groups</p>
  
  <pre><code>ls -l | grep "^-*x" # it shows every file
  </code></pre>
  
  <p>How I can make these commands for b) and c) works?</p>