[EDITED]
It can be considered as an extension to [this question][1].
echo | command
The above command can be used to supply one 'ENTER' character to the command's first input request.
How can i supply the next 'ENTER' character to the same command in its second input request.
Please comment if any other details are required.
Am giving the specific example which i want to implement.
I need to run SSH-keyGen
commmand in my shell script.
It will ask for following inputs:
- Enter the target file name
- Enter the pass phrase
- Enter the pass phrase again
How can we pass these three inputs to the command?
I tried with,
echo -ne "\n \n"| ssh-keygen //which is passing two new lines for the first input request only.
and
echo -ne "\n"|(echo -ne "\n"|ssh-keygen)// but still no positive result
Note: Am avoiding the input file name request in the above two command, just to make the things simple