Is it possible to write a script where the initial command requires user input so that it prompts the user to enter that input before running?
sudo add-apt-repository ppa:"this"/"and_that"
You can read user input in bash the following way:
In real life scenario you should also sanitize user input (i.e. check for non-alphanumeric characters before calling the command), but you can skip it if it's just for you.
You can use command