I have a command-line java program that takes a password and it's verification from stdin. Unfortunately, modifying the program isn't an option as it is proprietary.
I'm unable to pass the arguments from the unix command line using < since there are two prompts in the program, both asking for the same password. There are stdout statements asking for "Password" and "Password (validation):" on the command prompt.
How can I pass the password non-interactively to this program so that it can be executed automatically using a cron job / RC script?
Thanks!