Whenever you're installing a package, it usually prompts for y/n confirmation, is there a way to automate this?
3 Answers
You might try
yes | install-package.sh 4 Comments
Stupid.Fat.Cat
awesome! thanks, I didn't think of this. But I have one slight issue. What if I'm trying to install several packages? sudo apt-get install xxx yyy zzz. Do I have to pipe 3 yes to it? Is there a better way to do this?
Stupid.Fat.Cat
@izomorphius I was wondering if there was a better way to do this other than having 3 pipes
choroba
@Shelby.S: Try it yourself. One pipe is enough.
Ivaylo Strandjev
@choroba ,Shelby that is exactly what I meant
Try the -f switch. It probably depends on which package manager you have, so you should check the man-page for your package manager to confirm.
1 Comment
mzet
indeed, apt-get has -f switch but it's man page considers it dangerous so I would stick with -y