Specialty Forums
Security and Virus
General Hardware
CPUs/Overclocking
Networking
Digital Photo/Video
Office Software
PC Gaming
Console Gaming
Programming
Database
Web Development
Digital Home

General Forums
Windows XP
Windows Vista
Windows 95/98
Windows Me
Windows NT
Windows 2000
Win Server 2008
Win Server 2003
Windows 3.1
Linux
PDAs
BeOS
Novell Netware
OpenVMS
Solaris
Disk Op. System
Unix
Mac
OS/2

Drivers
Driver Scan
Driver Forum

Software
Automatic Updates

BIOS Updates

My Computing.Net

Solution Center

Free IT eBook

Howtos

Site Search

Message Find

RSS Feeds

Install Guides

Data Recovery

About

Home
Reply to Message Icon Go to Main Page Icon

Spawn, expect and send

Original Message
Name: iancaem02
Date: April 29, 2008 at 19:53:08 Pacific
Subject: Spawn, expect and send
OS: linux
CPU/Ram: 256
Model/Manufacturer: dell
Comment:
Hi, need help..
i have file to doing telnet to some address but it doesn't work..where is the mistake :

#/sbin/sh
#!/usr/bin/expect

#Var_Glob
set myServ 192.x.x.x
set myPass1 xxxx

spawn telnet $myServ
expect "password:"

# Send the password, and then wait for a shell prompt
send "$myPass1\r"

send command

send "quit\r"
expect eof

#end file

but after I excute I got mistake message:

spawn: command not found
couldn't read file "password:": no such file or directory
send: command not found
send: command not found
couldn't read file "eof": no such file or directory

so what should I do..
Need anyone advice..

Thanx so lot

BEST REGARDS
ADRIAN


Report Offensive Message For Removal


Response Number 1
Name: nails
Date: April 30, 2008 at 07:42:03 Pacific
Subject: Spawn, expect and send
Reply: (edit)
First, since this is an expect script, I'd remove this:

#/sbin/sh

Whatever your shell invocation is - expect in this case - always make sure that it's on line 1 beginning in column 1:

#!/usr/bin/expect

Second, you are getting this error because expect doesn't recognize what "command" is. I certainly don't see where command is defined in the script.


Report Offensive Follow Up For Removal




Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Spawn, expect and send

Comments:

 
  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 


Data Recovery Software




exessive internet traffic

ZoneAlarm Question. Blocked Connect

Windows Live Messenger Problem

Delete $Uninstall after SP3 updates

help for hp compaq laptop


The information on Computing.Net is the opinions of its users. Such opinions may not be accurate and they are to be used at your own risk. Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE

All content ©1996-2007 Computing.Net, LLC