title: cd command doesn't work inside bash script
body: <p>I want to get datetime and make a directory named as such, then <code>cd</code> to this directory.</p>
  
  <p>This is my bash script:</p>
  
  <pre><code>t=$(date +%F-%H%M%S) 
  mkdir $t
  cd $t
  </code></pre>
  
  <p>but it doesn't work fully.</p>
  
  <p>It creates a directory, but the <code>cd</code> command doesn't work.</p>
  
  <p>Screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/S0Wxf.png" alt="screenshot of command prompt"></p>