LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-19-2009, 11:57 PM   #1
kptkill
LQ Newbie
 
Registered: Apr 2007
Posts: 20

Rep: Reputation: 0
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?
 
Old 06-20-2009, 01:36 AM   #2
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
I'm sure it could be done..but how about doing everything in a for-loop instead?
 
Old 06-20-2009, 01:47 PM   #3
kptkill
LQ Newbie
 
Registered: Apr 2007
Posts: 20

Original Poster
Rep: Reputation: 0
Cool, I did that, and it worked great!

#!/bin/sh
for i in `cat mylist`
do
apt-get remove -y $i
done
 
Old 06-21-2009, 01:51 AM   #4
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 657

Rep: Reputation: 40
Glad I could help.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help!!! How USB HID keyboard input redirected to STDOUT ellappan Linux - Software 2 06-04-2009 10:03 PM
Repeated "input: AT Translated Set 2 keyboard as /class/input/input" messages AcerKev Mandriva 2 09-16-2007 08:35 AM
apt-get gives X Error: BadDevice, invalid or uninitialized input device ager-wick Linux - Software 2 06-13-2007 12:45 AM
iptables - why am I still being redirected? michaelsanford Linux - Networking 1 05-23-2005 03:52 PM
GPG and redirected input Vookimedlo Linux - Software 1 04-30-2005 04:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration