I have an expect script that logs into my Beaglebone:
#!/usr/bin/expect -f
spawn ssh debian@192.168.7.2
expect "debian@192.168.7.2's password:"
send "temppwd\r"
interact &&
mkdir emma &&
cd emma
This works and it logs into the debian account. However, it stops after interact
the other two commands are not being executed. What do I have to do to do that ?
EDIT
ok so thanks andy256 I figured that interact
is wrong here, however, I get
invalid command name "mkdir" while executing
How can I combine an expect script with normal shell script?
Thanks in advance !
ssh debian@192.168.7.2 <command>
? Would be lot easier than fiddling with expectdebian@192.168.7.2 ' "temppwd\r" '
but didn't work