diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-11-25 17:25:48 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-11-25 17:25:48 +1300 |
commit | 7021f36c94bc65a6164b559f97d9e8438bdccfd9 (patch) | |
tree | 06140233b7ca684d439c94de591e5ca681205208 /bin/cfr | |
parent | Merge branches 'freebsd' and 'openbsd' (diff) | |
download | dotfiles-7021f36c94bc65a6164b559f97d9e8438bdccfd9.tar.gz dotfiles-7021f36c94bc65a6164b559f97d9e8438bdccfd9.zip |
Simplify cf(1df) and cfr(1df)
It turns out `-exec foo {} +` is in fact POSIX behaviour (since SUSv3 as
far as I can tell).
Diffstat (limited to 'bin/cfr')
-rwxr-xr-x | bin/cfr | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -6,8 +6,8 @@ for dir in "${@:-.}" ; do ex=1 continue fi - printf '%u\t%s\n' \ - "$(find "$dir" -type d -exec cf -o -- {} \; | tot)" \ - "$dir" + count=$(find "$dir" -exec printf %.sx {} + | wc -c) + count=$((count - 1)) + printf '%u\t%s\n' "$count" "$dir" done exit "${ex:-0}" |