You are not logged in.
Pages: 1
Please help about the script to launch (custom) package list (e.g. 'packlist') with "commented" (#) ("disabled) packages and "uncomented" (allowed to install) packages (all of them with description.
I need something simple like
pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort packlist) )
except that above don't alow any sort of "comments" and/or descriptions (of packages) in "packlist".
Offline
Perhaps use sed or grep to filter out the comments.
aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies
Offline
Perhaps use sed or grep to filter out the comments.
Thanks for reply, but how it should to be (look) in my example? ("pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort packlist) )")
To explain, I need all listed options (e.g sort order is important, as well as to skip already installed packages).
Offline
Maybe this wil help.
List with comments looks something like this, but I want to install just gwenview and kdegraphics-kamera
##############################################################
#:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
#:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
#:: :: :: :: :: :: :: :: :: KDEGraphics :: :: :: :: :: :: :: ::
#:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
#:: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: :: ::
##############################################################
gwenview # A fast and easy to use image viewer for KDE.
kdegraphics-kamera # Configure Kamera.
#kdegraphics-kolourpaint # Paint Program
#kdegraphics-kruler # Screen Ruler
#kdegraphics-ksnapshot # Screen Capture Program
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_code
awk '!/^#/ {print $1}' file
gwenview
kdegraphics-kamera
Offline
It prints empty lines too. pacman doesn't seem to mind, but
awk '!/^#|^$/ {print $1}' file
takes care of it.
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_code
Sorry
Offline
It prints empty lines too. pacman doesn't seem to mind, but
awk '!/^#|^$/ {print $1}' file
takes care of it.
THANKS!!!
P.S. One more question. What options to add to print (create) such "clean" list in new file?
Offline
awk '!/^#|^$/ {print $1}' file > newfile
Moving to NC...
Offline
Install will be
pacman -S $(awk '!/^#|^$/ {print $1}' file)
But I ask for new file.
Offline
awk '!/^#|^$/ {print $1}' file > newfile
Moving to NC...
Thanks. Closed topic.
Offline
pacman -S $(awk '!/^#|^$/ {print $1}' file)
awk '!/^#|^$/ {print $1}' file > newfile
Offline
pacman -S $(awk '!/^#|^$/ {print $1}' file)
That is nice, but when you already "pulled it on table", another question:
How to include in your code also this command options for pacman (from begin of topic)
pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort file) )
Offline
You don't need one command. You can first parse the package list and then run pacman on that list:
awk '!/^#|^$/ {print $1}' file > newfile
pacman -S --needed $(comm -12 <(pacman -Slq|sort) <(sort newfile))
Offline
Pages: 1