Redirecting text from a file into a command
Hi
I don't really know what I'm doing wrong here, but what I'm essentially trying to do is to get a list of packages into the command "apt-get install" but I can't seem to get it to work. The text file in question I have filtered out a list of all the installed packages on my system so that (heaven forbid) I lose my machine I can recover it quickly from a base install. I've tried this two ways: Code:
$ sudo apt-get install < ./packages.txt Code:
cat ./packages.txt | sudo apt-get install Code:
acl I know this is a pretty lame question to ask, but I've tried fixing it myself and can't get anywhere... |
I'm installing Apt now to test it out, but at first glance you might want to try > instead of <.
|
Thanks for looking at it - if you use the code:
Code:
$ cat ./packages.txt > sudo apt-get install Code:
$ cat ./test.txt > sudo apt-get install |
No, I mean:
Code:
sudo apt-get install > ./packages.txt I've got APT, now I've got to update my list. |
Try
Code:
apt-get install $(cat <textfile>) in your case try Code:
aptitude install $(cat <textfile>) |
|
All times are GMT -5. The time now is 08:09 PM. |