How to use commands like xterm, spawn, expect, etc.
Posted: Fri Sep 14, 2012 7:27 am
Hi all, I'm new to this openwrt world and I'm trying to improve my learnings about it a little further, I hope you can help me.
The matter is this:
I have the main script which calls the second script with the following command:
and the runscript.sh code is:
And the result is always:
I've already installed the bash package along with other libs but the problem is always the same, do you have any clue?
Thanks
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 &
done
Code: 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" ;
interact
Code: 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 found
Thanks