3

I have a bash script that helps install a few applications automatically.

One app requests that I press ENTER to continue, or CTRL+C to cancel.

How can I automate my script to press ENTER when that prompt comes up?

Léa Gris
  • 17,497
  • 4
  • 32
  • 41

1 Answers1

4

For simple enter or confirmation, consider using the yes command:

yes '' | command_or_script

For automating more complex interactions, consider using expect.

See: https://stackoverflow.com/a/7013379/7939871

Léa Gris
  • 17,497
  • 4
  • 32
  • 41