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
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b38744-344c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b38744-344c5.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?