View Single Post
Old Jun 19th, 2006, 9:00 AM   #6
jim mcnamara
Hobbyist Programmer
 
Join Date: Jun 2005
Location: New Mexico
Posts: 228
Rep Power: 4 jim mcnamara is on a distinguished road
Do you know about the here document?
/path/to/myprogram $USER $PASS<<EOF
answer to question 1
output file filname
EOF

This is essentially what expect does. It knows the questions and answers ahead of time.
jim mcnamara is offline   Reply With Quote