0

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

1
  • Unless you give us the name of the software, there's not much we can do.
    – rahmu
    Mar 22 '13 at 7:57
4

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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