title: how to use expect and shell script together
body: <p>I am using expect script and some shell script command as below.</p>
  
  <pre><code>#!/usr/bin/expect
  #!/bin/bash
  spawn sudo mkdir -p /usr/lib/jvm1
  expect "\[sudo\] password for hduser:"
  send "cisco\r"
  
  spawn sudo apt-get install openssh-client
  </code></pre>
  
  <p>But the above command didnot install openssh-client. It just shows up the command. and nothing is installed.</p>
  
  <p>Where I am doing wrong here ?</p>