Skip to the content.

Yes

yes - output a string repeatedly until killed

Repeatedly output a line with all specified STRING(s), or ‘y’.

Usage

$ yes
$ yes | apt-get upgrade
$ yes "n" | apt-get upgrade

Reference(s)