How do I add a PPA in a shell script without user input?

Solution 1:

The script goes like this

#! /bin/sh
sudo add-apt-repository ppa:(Your ppa here) -y

BTW you will still have to enter password.