How can invoke an automatic "Y" in a script?

I have a small script:
mt rewind          
dd if=/dev/rmt/0n of=/dev/null  
/app_dsk/usr/dlc/bin/prorest apmdb /dev/rmt/0n

it is called by running the filename:
Problem is, that the program the script runs, always asks the question:
File Exists, Overwrite? (Y/N)
I have to manually press "Y" everytime.
How can I make the "Y" be entered automatically without me doing it?
Who is Participating?
Use a HERE document in Bourne shell:


The ENDHERE part is simply something you choose - ENDHERE is what I've always used.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.