LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   apt-get, redirected input (https://www.linuxquestions.org/questions/linux-software-2/apt-get-redirected-input-734312/)

kptkill 06-19-2009 11:57 PM

apt-get, redirected input
 
Is it possible to send a list of items to apt-get for example,

cat mylist.txt

A
B
C

and pipe it to apt-get remove?

kenneho 06-20-2009 01:36 AM

I'm sure it could be done..but how about doing everything in a for-loop instead?

kptkill 06-20-2009 01:47 PM

Cool, I did that, and it worked great!

#!/bin/sh
for i in `cat mylist`
do
apt-get remove -y $i
done

kenneho 06-21-2009 01:51 AM

Glad I could help. :)


All times are GMT -5. The time now is 08:57 AM.