Answers for ""expect" script external variables"

0

"expect" script external variables

#!/bin/sh

HPPASS1="$2"

send_command()
{
        echo "spawn ssh [email protected]"

        echo 'sleep 1'
        echo 'expect "*assword:*"'

        echo 'sleep 1'
        echo 'send  $1'
        ...
        echo 'expect oet'

}
conf_=`send_command "$HPPASS1" | /usr/bin/expect >> temp_log`
Posted by: Guest on June-30-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language