Of course, if any of your commands prompt for input, you'll be disappointed that's not always as easy as it appears on the surface.
Does anyone have a better way to do this kind of thing?
Does anyone have a better way to do this kind of thing?
[1] https://core.tcl.tk/expect/index [2] https://pexpect.readthedocs.io/en/stable/
i.e.
prefer `apt-get install -y` over `yes | apt-get install foo`