Solved

(Expect OR Tcl/Tk) AND ( C or C++)

Posted on 2001-09-08
8
419 Views
Last Modified: 2008-03-03
Does anyone have an example of working code using the 'Expect' library (under Unix) that actually does something?

I know about:   http://src.openresources.com/debian/src/interpreters/HTML/R/Expect_Init.html

I also know about the MAN pages the show how to initialize the process.  I'm looking for something that performs a 'wait'-type function in Expect (waiting to respond to a system prompt such as a login process or remote command prompt).

I will also entertain suggestions to use something OTHER than Expect to do the same job.

A copy and paste solution will work if you already have code.

I will not accept answers in Perl (I'm attempting to avoid it).   Answers must be in C or C++.

Please post all as comments and I will choose an answer from comments.
0
Comment
Question by:Triskelion
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
8 Comments
 
LVL 6

Author Comment

by:Triskelion
ID: 6477294
Points increased.
Any comments?
0
 
LVL 6

Author Comment

by:Triskelion
ID: 6481439
Points increased.
Any comments?
Yawn!
0
 
LVL 30

Expert Comment

by:Axter
ID: 6486773
What exactly does Expect do?

If you explain what it does, and what you want exactly, maybe we can offer an alternate solution.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 6

Author Comment

by:Triskelion
ID: 6487663
Expect emulates user actions at a command prompt.
If you're making a script that will log in to another system, perform some actions that require, use Expect.
It will wait for the prompts you tell it to and you can set timeout values.

It's mainly Unix based and can be run from shell.
It also has a Perl module and a C/C++ library.

I like its functionality stand-alone and under Perl.  I just want to use it in a familiar language.

http://src.openresources.com/debian/src/interpreters/HTML/S/expect_5.25.0.orig%20expect-5.25%20exp_main_exp.c.html#28

http://www.scriptics.com/man/expect5.31/libexpect.3.html
0
 
LVL 6

Author Comment

by:Triskelion
ID: 6487881
Gettin closer...
http://expect.nist.gov/
0
 
LVL 3

Accepted Solution

by:
modder earned 0 total points
ID: 6528047
Points refunded and PAQed. User found own solution.

modder
Community Support
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question