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
1 of 4

Question | how to 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 -

!/usr/bin

/opt/MNG/MNGVIEWHP/fe/uninstall sleep 10 echo "y"

Any idea? BTW - Centos 7.2