title: Linux Shell script what dirname and ? means?
body: <p>Can any body tell me what this command means?</p>
  
  <pre><code>selfDir=$(cd "$(dirname "$0")"; pwd) ?
  </code></pre>
  
  <p>I know</p>
  
  <ul>
  <li><code>$0</code> = running script name</li>
  <li><code>pwd</code> = current working dir</li>
  <li><code>cd</code> = to change dir</li>
  </ul>
  
  <p>What I need is what is <strong>dirname</strong>? and what <strong>?</strong> means at end to make this line completely understandable.</p>