Add fats script

This commit is contained in:
Augusto Gunsch 2021-11-07 11:02:12 -03:00
parent ca530f156e
commit ee55c42bc5
No known key found for this signature in database
GPG Key ID: F7EEFE29825C72DC
1 changed files with 9 additions and 0 deletions

9
local/bin/fats Executable file
View File

@ -0,0 +1,9 @@
#!/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/'