title: How to pass another command after executing script -a?
body: <p>I am writing a bash script that will execute </p>
  
  <pre><code>script -a logfile.log
  </code></pre>
  
  <p>How can I pass another command to the new shell that is spawned by script? For example I would like to SSH to a host after this is executed so that my SSH session will be recorded by script. I tried this:</p>
  
  <pre><code>script -a logfile.log | ssh hosname
  </code></pre>
  
  <p>the following error occurs:</p>
  
  <pre><code>Pseudo-terminal will not be allocated because stdin is not a terminal.
  </code></pre>