When typing on the ubuntu command line, how do I merge multiple options into one line?

for example, in apt-get upgrade, you still need to type a y after typing, and then you can apt-get-y upgrade

.

then, after installing lnmp, you can type. / pureftpd.sh according to pureftpd, and then press any key to install it. How to splice these two inputs into one line?

in other words, when you change the time zone, after typing tzselect, you still have to type 49 / 11. Is there any way to spell it directly into a line so that you can type it once?

Mar.23,2021

this depends on how the file being executed reads the input.

in most cases, you can use pipes to enter content automatically.
take tzselect as an example. To enter 4 9 11 , you can do this

.
echo -e '4\n9\n1\n1\n' | tzselect
Menu