views:

18

answers:

1

Hi, I have a script that prompt for a password to achieve a specific task. I wanna skip entering password each time. for this, i thought about sth like that:

./myscript < my_file_containing_pass

but unfortunatly, this doesn't work.

any idea?

A: 

Ensure you have a nweline in the end of your password file.

If that didn't work, set an environment variable, and alter your script so that if it finds this env. variable, it reads the password from the file with the variable value, otherwise it prompts the user.

aularon
maroxe