Shell Scripts Answering Prompts
I'm still a newb at writing shell scripts. I've figured out enough to make them run commands to automate things but I have a question. If I know a command will be met with a prompting question (password, yes or no to install dependancies, etc.) could I write in the script how to go about answering such prompts so if I were to run a long script it would automatically answer the questions for me?