title: How do I know if I'm running a nested shell?
body: <p>When using a *nix shell (usually bash), I often spawn a sub-shell with which I can take care of a small task (usually in another directory), then exit out of to resume the session of the parent shell.</p>
  
  <p>Once in a while, I'll lose track of whether I'm running a nested shell, or in my top-level shell, and I'll accidentally spawn an additional sub-shell or exit out of the top-level shell by mistake.</p>
  
  <p>Is there a simple way to determine whether I'm running in a nested shell?  Or am I going about my problem (by spawning sub-shells) in a completely wrong way?</p>