Люди из freenode #bash помогли мне написать этот скрипт:
cmppkgs(){
local IFS="|" a b c d;
while IFS='?' read -r a b c; do
d=$(curl -s "https://pkgstats.archlinux.de/api/packages/$b" | jq.popularity);
echo "$a?$b?$d?$c";
done < <(expac -SsH M "%m?%n?%d" "$*" | sort -h ) | column -t -s'?'
}
Вы можете использовать это как:
$ cmppkg lynx w3m
2.02 MiB w3m 32.21 Text-based Web browser as well as pager
4.99 MiB lynx 31.02 A text browser for the World Wide Web
7.24 MiB links 15.64 A text WWW browser, similar to Lynx