title: Bash script awkwardness with pwd
body: <p>I've got a strange issue while working with a bash script. Here it is:</p>
  
  <pre><code>PWD=${pwd}
  # several commands
  cd /etc/nginx/sites-enabled/
  # more commands
  cd $PWD
  # I expect that I returning to my directory, 
  # but $PWD contains current dir - /etc/nginx/sites-enabled/
  </code></pre>
  
  <p>This behavior is kind of lazy. <code>$PWD</code> stores command, which calculates the current directory and returns it at the moment we call <code>$PWD</code>, but I want to store the string variable in it. How to do that? </p>