title: how do I check if the directory "d" exists but does not have the right to read for the current user
body: <p>I need a hand for a program in bash.
  How can I check if the "d" directory exists but does not have the right to read for the current user?   </p>
  
  <pre><code>if [ -d $d ]; #Check if directory exist
  then
      #check the permission
  fi
  </code></pre>