0

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?

  • Is the installer a GUI or a CLI? What do the prompts look like? – muru Mar 5 '16 at 9:30
  • @muru - It is a CLI. – bvb Mar 5 '16 at 10:16
0

For a cli you can run your command once with

autoexpect command args...

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 the expect and tcl 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 the expect man page.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.