The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #10 (permalink)  
Old 01-31-2002
erwinspeybroeck erwinspeybroeck is offline
Registered User
 

Join Date: Jan 2002
Posts: 4
Question automate input

Hello, thanks for your time, but still no solution

when i try

program << eof >> $result 2>&1
answer1
eof

the program just sits waiting. When i type the answer1-string myself, everything goes well.

I installed expect (and tcl --> both latest versions)
and tried the following script :

#!/usr/local/bin/expect
send_user "start expect\r"
spawn PROGRAM
expect "pass phrase:"
send "answer1\r"
send_user "stop expect\r"

This doesn't work either --> the program gets started, but finishes after displaying the question to enter the pass phrase.
The start en stop expect doesn't appear on screen also.

Has the fact that when in normal mode (outside a script) the pass phrase is entered it doesn't appear on the screen (password-like) ?

Thanks in advance

Erwin