Skip to content

Instantly share code, notes, and snippets.

@dmix
Last active October 28, 2015 21:41
Show Gist options
  • Save dmix/7abfe3f0f9c4d79f751b to your computer and use it in GitHub Desktop.
Save dmix/7abfe3f0f9c4d79f751b to your computer and use it in GitHub Desktop.
Sort Archlinux AUR packages by votes when querying with Yaourt
yaourt vim > vim.log
cat vim.log | awk '/aur/{print $1 $2 " " $4}' | sed -r 's/\(Out of date\)//g' | sed -r 's/([0-9]*)(\S+)\s\(([0-9]*)\)/\3 - \2/g' | sort -n
OR
yaourt vim | awk '/aur/{print $1 $2 " " $4}' | sed -r 's/\(Out of date\)//g' | sed -r 's/([0-9]*)(\S+)\s\(([0-9]*)\)/\3 - \2/g' | sort -n
[press enter when asked to enter a package number to install]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment