installing programs from the bash script

First of all, you can use

sudo apt-get install pkg1 pkg2 ... pkg3

and next, with the option -y, apt-get will not ask for confirmation.


The yes command is useful here

yes | ./install_script.sh