Created
November 18, 2022 11:09
-
-
Save jdrowell/7cd4267fd94969cea418cb03536f5213 to your computer and use it in GitHub Desktop.
List all packages installed in an Arch Linux based machine, with a short description (pure shell, no Bash required)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
pacman -Qi | while read line; do | |
IFS=':' read -ra p <<< "$line" | |
case "${p[0]}" in | |
*Name*) name="${p[1]}" ;; | |
*Description*) desc="${p[1]}" ;; | |
"") echo $name - $desc | |
esac | |
done | |
## Sample output | |
#a52dec - A free library for decoding ATSC A/52 streams | |
#aalib - A portable ASCII art graphic library | |
#accountsservice - D-Bus interface for user account query and manipulation | |
#acl - Access control list utilities, libraries and headers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment