aboutsummaryrefslogtreecommitdiff
path: root/programSizes.sh
blob: f892497fbc54e1d0a6236181d61fdd267fdb4114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/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