I am trying to install one application in my Linux box. This installation asks for few manual inputs like root username, password and few yes/no options.
I want to store these inputs in a text file so that the same can be read from it instead of waiting for manual inputs.
Can anyone please share some insights on how to achieve this?
For a cli you can run your command once with
and interact with it as usual with the answers wanted. When this ends you will have an executable file
script.exp
which is an expect script (install theexpect
andtcl
packages). You can run it at any time to repeat the command and have the same answers provided. The file is easily edited in a text editor to slightly modify an answer. You can write your own such scripts to do more complex interactions. See theexpect
man page.