title: Linux script capture terminal in shell script
body: <p>I wrote a shell script in linux named script.sh. It suppose to call "script -a record.txt" command when being executed and create a capture of my terminal in a file called record.txt</p>
  
  <pre><code>#!/bin/bash
  
  script -a record.txt
  
  mkdir folder
  </code></pre>
  
  <p>when i run this script.sh file, i get the record.txt file created but the content "mkdir folder" is not recorded in there. the "mkdir folder" command was ignored and thus did not let me create a new directory. anyone know how to fix this?</p>