LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-23-2005, 05:16 AM   #1
Kedelfor
Member
 
Registered: Jan 2004
Posts: 49

Rep: Reputation: 15
Bash Auto Answer


Hello again. I am back with another question. I want to automate answers form a script. Ok the script is not mine to edit, but I want to automatically answer it. My problem is this.

The script runs and asks a series of questions. I want to automatically answer those questions with answers that are pulled form another source.

I run a script it outputs data which is saved to another file. This data is basically the answers to the questions the other script asks. The problem I am running into is that when I call the script form with in the automater then redirect the data into it I get a command can not be found.

If you need more info I will try my best. It also seems that it stops and won't take any input until the damn question is answered. Like if I do an echo right after, or a sleep, it just skips it. I am having problems feeding the actually answer to the prompt.

Any help or ideas would be greatly appreciated.

Kedelfor
 
Old 11-23-2005, 06:15 AM   #2
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I think "expect" is what you want. It can automate console programs.

Yves.
 
  


Reply



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
auto-completion in bash with wildcards juanbobo Linux - Software 2 04-07-2005 12:56 AM
editing bash to auto activate some options? kintaroe Linux - Newbie 1 10-02-2004 02:07 PM
Bash to Auto Launch a Program???? embsupafly Linux - Software 1 07-27-2004 12:25 AM
auto answer in sendmail ronen Linux - Networking 6 01-11-2004 11:32 PM
bash auto-complete behaviour changes acid_kewpie Linux - Software 5 10-26-2002 01:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:59 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration