i have a command that ask for a password as parameter. The documentation of the command allow a infile redirection as "parameter" argument (taking the file content as value). It works but if i add a STDOUT redirection, the infile is ignored as input
# command here after is a generic name for any executable, not the word command
# work
command -p <pwd.file
# failed
command -p <pwd.file >out.file
i try with exec pre redirection, group of command or subshell with parenthesis, nothing work.
exec 1>out.file
command -p <pwd.file
the out.file show:
Password?
A password is required. Enter a password value.
Password?
A password is required. Enter a password value.
until i cancel the execution
i see this thread How to redirect ... but without infile