I'm trying to automate a server setup using a shell script.

I need to install a few dependencies with `apt-get` and some require the user to input `y` before the install continues.

My question is how do I make sure the shell script automatically inserts `y` every time it sees something like `Do you want to continue [Y/n]?` ?

I've tried `sudo apt-get install git << 'y'` and `'y' | sudo apt-get install git` but with no results.

What could I try next?