twice confirmation in the script

from one script invoke another script will need to do double confirmation like: 'y' and 'y'

exp:

echo 'y' | /a/b/c.sh

only input 1 'y' in the c.sh, but the c.sh required 2 'y' (twice confirmation)

is there anyway get resolve this issue?

please help

Hi.

Assuming it's the only manual input your script needs from you:

printf "y\ny" | /a/b/c.sh

if the c.sh will be invoke first by first 'y' then only 2nd 'y', this will be work too?

---------- Post updated at 12:18 PM ---------- Previous update was at 12:18 PM ----------

thanks... i did a small test. and it worked...

thanks alot