LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-24-2005, 02:16 AM   #1
e-freak
Member
 
Registered: Jan 2005
Location: India
Distribution: Fedora Core 4, x86_64
Posts: 39

Rep: Reputation: 15
Expect how to?


Hello,

I have an ISP dialer script in which I have to manually enter the username and password. I want to automate this script to automatically accept the username and password. I tried to Google for some tutorial on the Expect command. I found the following link a little useful...

http://www.faqs.org/faqs/unix-faq/fa...section-9.html

However, the script they have given uses the command 'spawn' which is not accepted on my system as a valid command.

If anyone has used Expect before, please help me out. I am on Ubuntu Hoary and have installed Expect using 'apt-get install expect' . Thanks in advance!
 
Old 09-24-2005, 04:28 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,379

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well spawn isn't a system command, it's a command for internal use with expect. the contents of the script file is run by expect, not by the shell, hence the common use of the shebang at the start: #!/bin/expect to make it run like a totally normal executable.
 
Old 09-24-2005, 04:49 AM   #3
e-freak
Member
 
Registered: Jan 2005
Location: India
Distribution: Fedora Core 4, x86_64
Posts: 39

Original Poster
Rep: Reputation: 15
Thanks for replying. Ifinally got my script ready. In case anyone is interested, contact me personally, esp people from India who use the Sify ISP.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Expect Script coolest Programming 7 02-16-2009 03:59 PM
help with expect neyoung Programming 3 02-09-2004 09:41 PM
How to use expect TomCruise2002 Linux - General 0 10-02-2003 09:53 PM
Using Expect for Linux rkeng Linux - General 2 08-01-2003 09:01 PM
expect sk8guitar Programming 3 07-29-2003 09:24 PM


All times are GMT -5. The time now is 02:18 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration