I realise this might be a stupid question, but I've been trying to follow the advice on the following post http://stackoverflow.com/questions/16928004/how-to-enter-ssh-password-using-bash
However, I've come up to a problem. I installed expect with
sudo apt-get install expect
You can find the location by listing all the files the package
expect provides by
dpkg -L expect
or narrow it down to only the filenames ending in
dpkg -L expect | grep '/expect$'
or if resides in typical binary directories:
dpkg -L expect | grep -E '/s?bin/'
Also the typical way to go through the
$PATH for an executable is to use:
or better (considering shell internals), not strictly needed in this case though:
type -a expect