diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-01 22:59:08 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-09-01 22:59:08 +1200 |
commit | cd63bce2f6f511078eb8fcf7a1c0e86eabb689d3 (patch) | |
tree | b44887d54ec00d1f84716c390480fa7ebea33e0f /bin/cfr | |
parent | Move HISTSIZE and MAILCHECK to shrc (diff) | |
download | dotfiles-cd63bce2f6f511078eb8fcf7a1c0e86eabb689d3.tar.gz dotfiles-cd63bce2f6f511078eb8fcf7a1c0e86eabb689d3.zip |
Fix POSIX non-compliance in cfr(1)
Which slows it down a *lot*; add an issue.
Diffstat (limited to 'bin/cfr')
-rwxr-xr-x | bin/cfr | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,4 +1,6 @@ #!/bin/sh # Count files recursively with find(1); this includes the given directories -# themselves and their subdirectories as entries -find "${@:-"$PWD"}" -printf . | wc -c +# themselves and their subdirectories as entries, and correctly handles files +# with newlines in their names. It's also all POSIX ... but on big directories, +# it's *slow*. +find "${@:-.}" -exec printf %.sx {} \; | wc -c |