in reply to Getting user input with STDOUT tee to file
Doesn't yum have a "-y" option? Avoid the question entirely.