I'm writing a bash script to install php5.4 and I'd like to automate this for a test VM. The rpm command I have is:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
yum install php54w
Now, in the middle of this running, there is a user prompt to enter [Y/N] whether or not to download the dependencies. So I either need to:
Simulate the user input of [Y]; or
pass in a command for yum not to ask and assume [Y]
What is the best method for a bash script and how do I accomplish both of the above?