You are not logged in.
I would like to know if there is a way to make pacman use a text file as it's input to install a long list of packages. The list I have was generated using:
sudo pacman -Q > pacman.outI tried
sudo pacman -S < pacman.outIs this possible? Thanks
Last edited by DarksideEE7 (2010-10-20 01:41:39)
Offline
Offline
Awesome, thanks.
Offline
Perhaps this procedure generated by karol will help:
ls "kde" |grep 4.5.1 |xargs pacman -U It might need some modding but is the general idea.....
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
If you still want to be able to pipe to pacman, I wrote a fairly non-invasive patch to do just that. I find it more unix'like, and xargs requires --no-confirm which is kinda icky.
Offline
If you still want to be able to pipe to pacman, I wrote a fairly non-invasive patch to do just that. I find it more unix'like, and xargs requires --no-confirm which is kinda icky.
I still have that patch flagged on my TODO list... so it is not completely lost! ![]()
Offline
Well I'm not sure if I will be able to use the file in it's current format since I used:
sudo pacman -Q > laptop.pacmanto generate the file, so the version is after the package.
If anyone has any suggestions on how to remove the version column (using awk, sed, column, or something....) I would appreciate it. I have very limited experience with awk and sed.
For instance, colunn -t | pacman.out results in output with it separated:
xvidcore 1.2.2-1
xz 4.999.9beta_174_g41bc-1
yajl 1.0.9-3
yaourt 0.9.4.3-1
yasm 1.0.1-1
zenity 2.32.0-1
zip 3.0-1
zlib 1.2.5-2
zvbi 0.2.33-2If someone knows how to remove the last column then this would solve my problem:
sudo pacman -S $(< laptop.pacman)EDIT:
This did it.
cut -d ' ' -f 1 laptop.pacmanBTW if you want to install from the AUR this works for Clyde as well. Thanks for the help everyone.
Last edited by DarksideEE7 (2010-10-20 01:39:27)
Offline
As you discovered, you can use cut...
You can also use awk!
print '{ print $1 }' laptop.pacmanOr sed!
sed 's/ .*//' laptop.pacmanOr just bash!
while read package version; do echo $package; done < laptop.pacmanOr ed!
ed -s laptop.pacman <<< $',s/ .*//g\n,p'falconindy wrote:If you still want to be able to pipe to pacman, I wrote a fairly non-invasive patch to do just that. I find it more unix'like, and xargs requires --no-confirm which is kinda icky.
I still have that patch flagged on my TODO list... so it is not completely lost!
Oooh. I figured it was tossed out, since Dan and yourself didn't seem all that interested. /me waits patiently.
Offline
Yea I need to use awk and sed more....they are very powerful tools. My experience with them is limited to a basic tutorial.
Offline