There is a script that requires me to enter the password before it continues:
bash-3.2$ ./script.sh <parameter_list> Enter the password for the Database: .. ..
I am interested in capturing the standard output of the script into a log file, while securely passing the password to the script.
I tried to pass the password into standard input as follows:
bash-3.2$ echo "<password>" > /secure/path/password.txt bash-3.2$ ./script.sh <parameter_list> < /secure/path/password.txt
But this doesn't seem to work. If it did, I could simply use
tee to redirect the output to a log file.