A silly loop to dump the names of all your installed packages into a file, listed alphabetically
Just in case you'd like to see what's on board. And no, pacman won't harass you for a password with -Q.
for i in {a..z} ; do echo -e ${i}":"$'\t'$(pacman -Qq | grep ^${i}) >> pkgs.txt ; done
Feel free to adopt, adapt, improve, enhance, simplify, modify, stultify, transmogrify, steal, pilfer, fold, bend, or mutilate.
About this post
- Posted
- Archived
- Score
- 9 · 100% up
- Kind
- Text
- ID
- 2d2qpr
7 comments
26 invocations of pacman and 26 invocations of grep and 26 open/seek/write/close operations on pkgs.txt?
Damn awk wizards. Stop being cool.
The output of pacman -Q is already sorted alphabetically…?
"Grouped" alphabetically probably would have been a better title.
I have something similar that parses /var/log/pacman.log and outputs all the packages I explicitly installed and categorizes them as either from the main repos or from AUR. It's nice having this easy to read record when I eventually decide to try out a new distro, decide it's not as good as arch, and come back.
Or just use
sed:Er not sure why this is so long to type? Why not just use: