mirror of
https://github.com/notwa/rc
synced 2024-06-01 15:33:07 -07:00
use shell expansions instead of piping into cut
This commit is contained in:
parent
cfd3c2b18b
commit
76415f4742
3
sh/oxo
3
sh/oxo
|
@ -75,7 +75,8 @@ oxo() { ### @-
|
||||||
fi
|
fi
|
||||||
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
|
if [ "$kib" -gt 524288 ]; then
|
||||||
printf "$bad" "oxo: file too large: $f" >&2
|
printf "$bad" "oxo: file too large: $f" >&2
|
||||||
|
|
Loading…
Reference in New Issue
Block a user