How to set input from bash script in an interactive shell?

So when I install percona mysql, I get the following.

I am trying to automate sql installation using a bash script but how do I enter into the input using bash script?

sudo DEBIAN_FRONTEND=noninteractive apt-get install -y percona-server-server

A temporary password for root mysql user will be automatically generated. You can find it by grep’ing the MySQL error log. You will need to change this password before it can be used. All of this is easily automated in bash.

1 Like