#!/bin/sh # programSizes.sh # # Outputs the sizes of programs installed by pacman ordered by size. for program in $(pacman -Q | cut -d' ' -f1); do pacman -Qi "$program" | grep -E '(^Name|^Installed Size)' done | sed '/^Name/{ N s/Name\s*: // s/\nInstalled Size\s*:// s/\([0-9]\) \([^0-9]\)/\1\2/ s/\([^ ]* \)\(.*\)/\2 \1/}' | sort -h