dotfiles/local/bin/fats

10 lines
215 B
Bash
Executable File

#!/bin/sh
pacman -Qeti |
awk '
/^Name/ {printf("%s ", $3)}
/^Installed Size/ {printf("%s %s\n", $4, $5)}' |
awk '{printf("%7.2f%3s %s\n", $2, $3, $1)}' |
sort -h |
sed -E 's/([0-9])([MKG])/\1 \2/' |
sed 's/ B/ B/'