The matter is this:
I have the main script which calls the second script with the following command:
Code: Select all
for ROUTER in {1..10}
do
xterm -iconic -e $path/runscript.sh $ROUTER &
doneCode: Select all
#!/bin/bash
#!/usr/bin/expect -f
set arg1 [lindex $argv 0]
spawn ssh root@192.168.$arg1.1 ; 
expect password ; 
send "12345\n" ; 
expect '~#' ; 
send "./script3.sh\n" ; 
interactCode: Select all
- bash: xterm: command not found
- bash: spaw: command not found
- bash: expect: command not found
- bash: send: command not found
- bash: interact: command not foundThanks