I have a binary that asks me for a password for some operations. I want to supply it the password by re-directing the passwd from a BASH script/C program. The standard methods:
binaryname --options < filename-containing-mypass
binaryname --options < mypass
binaryname --options < EOF
does not work. I am still prompted for the password. The program has the following output:
$ binaryname --options
I am running a box having RH9.0, my shell being bash, and I would like to solve it on a bash shell only. I know that it can be solved on a ksh with relative ease. I have the source for the program as well, it opens the descriptor for tty and gets data from stdin.