2

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
  • 14,880
  • 4
  • 28
  • 36

1 Answers1

3

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
  • 14,880
  • 4
  • 28
  • 36