You are not logged in.
Pages: 1
I want to download all the results when i do a search, is this possible?
Offline
errm.... why do you want to do that? sometimes when you want to do something, and it's not readilly available, it's because there's a different way to accomplish the same thing...
can you explain why you need this?
it'd probably require some small script to do something like that
Offline
Warning: these commands are only on one line each
Note:
1. must be run as root
2. replace "pacman -Sw" with "pacman -Sy" to install the packages. "pacman -Sw" only downloads the packages.
3. Replace string by what you're looking for. Note that there are 2 positions where STRING must be replaced in the first example.
The following lines installs all packages with STRING in their name.
pacman -Ss STRING | grep "/.* [0-9]..*-*." | grep "STRING" |
sed -e "s/^.*///g" | sed -e "s/ .*$//g" | while read p; do yes | pacman -Sw $p ; done
The following line installs all files which have STRING in their name OR description.
pacman -Ss STRING | grep "/.* [0-9]..*-*." | sed -e "s/^.*///g" | sed -e "s/ .*$//g" |
while read p; do yes | pacman -Sw $p ; done
---
Or.. maybe you're looking for groups. Use
pacman -Sg
to list all the available groups.
:: / my web presence
Offline
#!/bin/sh
p=`pacman -Ss $* | sed -e 's/^ .*//' -e 's|.*/||' -e 's/ .*//'`
echo $p
pacman -S $p
Just give the thing you want to search for as parameter and happy installing.
Offline
Oh... haven't seen multiple seds in one line by now.
Good to know that. Thanks i3839.
:: / my web presence
Offline
Ah silly of me, it can be simpler:
#!/bin/sh
p=`pacman -Ss $* | sed -e 's/ .*//' -e 's|.*/||'`
echo $p
pacman -S $p
Offline
Ah silly of me, it can be simpler:
#!/bin/sh p=`pacman -Ss $* | sed -e 's/ .*//' -e 's|.*/||'` echo $p pacman -S $p
I think Penguin put it best when he said "sed '\//////lookslike/ateepee'"
Offline
I think Penguin put it best when he said "sed '\//////lookslike/ateepee'"
Only if you want...
#!/bin/sh
p=`pacman -Ss $* | sed -e 'ss .*ss' -e 'ss.*/ss'`
echo $p
pacman -S $p
Offline
Thanks guys!
Offline
Pages: 1