title: Extract the last directory of a pwd output
body: <p>How do I extract the last directory of a pwd output? I don't want to use any knowledge of how many levels there are in the directory structure. If I wanted to use that, I could do something like:</p>
  
  <pre><code>&gt; pwd
  /home/kiki/dev/my_project
  &gt; pwd | cut -d'/' -f5
  my_project
  </code></pre>
  
  <p>But I want to use a command that works regardless of where I am in the directory structure. I assume there is a simple command to do this using awk or sed.</p>