#!/bin/sh /usr/bin/expect -c "spawn ssh localadmin@$1 expect \"password:\" send \"99999999\r\" expect \"localadmin> \" send \"device\r\" expect \"localadmin> device (VideoRack1)> \" send \"load 1\r\" expect \"localadmin> device (VideoRack1)> load (1)> \" send \"$2\r\" expect \"Are you sure? Type \\\"yes\\\" to proceed: \" send \"yes\r\" expect \"localadmin> device (VideoRack1)> load (1)> \" send \"exit\r\" expect \"localadmin> device (VideoRack1)> \" send \"load 2\r\" expect \"localadmin> device (VideoRack1)> load (2)> \" send \"$2\r\" expect \"Are you sure? Type \\\"yes\\\" to proceed: \" send \"yes\r\" expect \"localadmin> device (VideoRack1)> load (2)> \" send \"exit\r\" expect \"localadmin> device (VideoRack1)> \" send \"exit\r\" expect \"localadmin> \" send \"exit\r\" expect \"\0\" "