Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: Arch Linux: script werkt, maar erg traag.  (gelezen 1232 keer)

Offline bart85

  • Lid
Arch Linux: script werkt, maar erg traag.
« Gepost op: 2022/10/25, 16:50:30 »
Het volgende script is werkzaam, maar traag.
#!/bin/bash
for i in $(pacman -Qq)
do
[[ $(pacman -Ss ^$i$ ) ]] && echo "in repo: $i" || echo "not in repo: $i"
done

Ik wil nl. achterhalen welke pakketten uit de repo's komen en welke zelf zijn geinstalleerd m.b.v. de AUR. Het uitvoeren van een script duurt even, vooral omdat het alle geinstalleerde pakketten bij langs gaat. Kan het in een andere taal? In een andere taal wat multithreading ondersteund? Het zijn op mijn systeem 752 pakketten om te checken.
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.

Offline bart85

  • Lid
Re: Arch Linux: script werkt, maar erg traag.
« Reactie #1 Gepost op: 2022/10/25, 17:31:10 »
for i in $(pacman -Qq)
do
[[ $(pacman -Qi $i | grep ^Validated\ By | grep None) ]] && echo $i
done

Deze code werkt sneller, omdat alles lokaal word bekeken.

Het volgende is denk het best.
for i in $(pacman -Qq)
do
[[ $(pacman -Qi $i | grep ^Packager | grep Unknown) ]] && echo $i
done
« Laatst bewerkt op: 2022/10/25, 20:06:35 door bart85 »
Je leert maar mooi over weg gaan met de commandline.
Linus: "I'm happy with the people who are wandering around looking at the stars but I am looking at the ground and I want to fix the pothole before I fall in."
I look to the clouds behind me and see the thunder coming.