Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
2 of 4 added 20 characters in body; edited title

How do I print character automatically in bash script?

I wanna uninstall some program via bash script. After run the command - terminal asking me if I'm sure that I want to uninstall it. So I need to answer y. I want to do it automatically and answer y after delay of 10 seconds.

I did this example but it's not working -

sleep 10
echo "y"

Any idea? BTW - Centos 7.2