I'm trying to write a script to automate installation of a program in Linux. It requires some user input during installation. Most are straight forward like simple y
or n
. I add these responses to a file responses.txt
and just pipe it to the installation script like this: ./start < responses.txt
.
However, complications arise at a particular point in the installation. The program asks the user to hit CTRL+C
at a particular point if they want to skip installation of a particular component. If you don't hit CTRL+C
during this limited time window, the script goes ahead and installs this component.
I want to install the program without this component. How can I send CTRL+C
during this time window programmatically?
Based on my limited understanding, my automated solution would need a way to detect when the installation asks the user to send these keystrokes and then my script should send some sort of interrupt?
Is it even possible to do something like this?
See here for more information on why this is: https://stackoverflow.com/questions/6196321/echo-control-c-character Thus you will have to think of a different way to automate this. – Quentin Kniep Jul 30 '18 at 14:13