aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-11-25 20:37:58 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-11-25 20:37:58 +1300
commited6fb3f1f304c8c55bb5447820bb6162d3cd5497 (patch)
tree7e40961a25dd14338b20fb8eb814c29336ffaccb /bin
parentCorrect order of assignments in sqs(1df) (diff)
downloaddotfiles-ed6fb3f1f304c8c55bb5447820bb6162d3cd5497.tar.gz
dotfiles-ed6fb3f1f304c8c55bb5447820bb6162d3cd5497.zip
Less clumsy method of counting
Diffstat (limited to 'bin')
-rwxr-xr-xbin/cf6
1 files changed, 1 insertions, 5 deletions
diff --git a/bin/cf b/bin/cf
index 5e2f42b9..4a4c7f7f 100755
--- a/bin/cf
+++ b/bin/cf
@@ -14,13 +14,9 @@ for dir in "${@:-.}" ; do
continue
fi
- # Make an escaped form of the directory to handle cases where the directory
- # name actually has find(1) pattern metacharacters in it
- dirx=$(printf %s "$dir" | sed 's/\([*?\[\]]\)/\\\1/g')
-
# Count the files
count=$(
- find "$dir" ! -path "$dirx" -prune -exec printf %.sx {} + |
+ find "$dir" -path "$dir"'/*' -prune -exec printf %.sx {} + |
wc -c
)