Let's say I have a script that prompts for input, or even let's say I want to do
scp your_username@remotehost.com:foobar.txt /some/local/directory
and it will prompt me for password (I know that I can add ssh key and such the question is not about that).
How can I write a script or manually inject the response?
So if I have a script which will first ask for password and then ask me to input yes 5 times, how can I do it so that I run it as ./script.sh password yes
and it works?
Thanks to anyone for their help.