title: Shell Script that does chroot and execute commands in chroot
body: <p>If in shell script I write</p>
  
  <pre><code>chroot /home/mayank/chroot/codebase
  cd SBC
  </code></pre>
  
  <p>when I run this shell script It does go in the <code>chroot</code> but does not execute the command <code>cd SBC</code>, 
  when I exit <code>chroot</code> then it executes <code>cd SBC</code>.</p>
  
  <p>How can I achieve something that does <code>chroot</code> and execute commands in <code>chroot</code> through shell script ?? </p>