projects
/
feisty_meow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
529ea90
)
updated fast counter with docs
author
Chris Koeritz
<cak0l@virginia.edu>
Wed, 21 Jul 2021 20:52:26 +0000
(16:52 -0400)
committer
Chris Koeritz
<cak0l@virginia.edu>
Wed, 21 Jul 2021 20:52:26 +0000
(16:52 -0400)
scripts/files/fast_counter.sh
patch
|
blob
|
history
diff --git
a/scripts/files/fast_counter.sh
b/scripts/files/fast_counter.sh
index c40e33a37214554eefd20d1365612f0082293d4f..e359514e6298495a6819303601274d60354143ef 100644
(file)
--- a/
scripts/files/fast_counter.sh
+++ b/
scripts/files/fast_counter.sh
@@
-1,7
+1,14
@@
for dir in "${@}"; do
for dir in "${@}"; do
- /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v "$dir\/.*:$" | wc
+ /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v ".*:$" | wc -l
+
+ # patterns that remove files from being counted, above:
+ #
+ # ^$ -- all blank lines
+ # ^\.$ -- all lines with just a dot (current directory)
+ # ^\.\.$ -- all lines with just two dots (parent directory)
+ # .*:$ -- all lines that end with a colon (directory heading from recursive ls)
done
done