Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am a complete amateur in Linux.

There is a software that only runs on Linux. It came with a virtual machine package and every thing.

When inside the virtual machine, I run a .py file in the terminal and it starts downloading the software. The software file is quite large. I noticed every time I let the software to download, the installation wants to start and asks me for the password. I am usually not there to enter and it fails.

I wanted to see how I can get over this problem. Thanks

share|improve this question
    
Unless you give us the name of the software, there's not much we can do. –  rahmu Mar 22 '13 at 7:57

1 Answer 1

Expect scripting might come in help for you.Here is a sample :

#!/bin/bash
read -s PWD
/usr/bin/expect <<EOD
spawn ./program.pl
expect "Password:"
send "your password\r";
interact
EOD

Here is Tutorial for expect scripting :Expect scripting from Oreilly

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.