Results 1 to 1 of 1
Hi all,
I need to send some commnds via expect to the server I have logged in.
For eg I have logged in to a server("XXX") and I need to ...
- 07-28-2008 #1Just Joined!
- Join Date
- Jul 2008
- Posts
- 3
Need Help with expect script...
Hi all,
I need to send some commnds via expect to the server I have logged in.
For eg I have logged in to a server("XXX") and I need to send some commnads.
Note.(Iam already in the server so need tp spwan and telnet to the server again)
Also I need not automate the login procedure to server.
#!/bin/ksh
set klug { ${1+"$@"}
shift
shift
exec /usr/bin/expect -f $0 ${1+"$@"}
}
send "newgrp XXX\r"
send "setup XXX\r"
interact
I get the below error when running..
cannot interact with self - set spawn_id to a spawned process
while executing
"interact"
(file "./neuset" line 11)
It should be Interactive also!!! Is there any way I can achieve what I need within login to the server using(SPAWN TELNET) as iam already executing the script in server.


Reply With Quote