1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-18 01:53:22 -07:00

use shell expansions instead of piping into cut

This commit is contained in:
Connor Olding 2021-10-07 11:03:49 -07:00
parent cfd3c2b18b
commit 76415f4742

3
sh/oxo
View File

@ -75,7 +75,8 @@ oxo() { ### @-
fi
fi
local kib="$(du -k -- "$f" | cut -f1)"
local kib="$(du -k -- "$f")"
kib="${kib%%[!0-9]*}" # strip the path, keep the size
if [ "$kib" -gt 524288 ]; then
printf "$bad" "oxo: file too large: $f" >&2