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:
51c335a
)
simple script to count number of files in a directory
author
Chris Koeritz
<fred@gruntose.com>
Wed, 21 Jul 2021 20:20:05 +0000
(16:20 -0400)
committer
Chris Koeritz
<fred@gruntose.com>
Wed, 21 Jul 2021 20:20:05 +0000
(16:20 -0400)
doesn't include directories. may not be perfect; does look for lines ending in a colon, to remove directory headings from recursive ls list.
scripts/files/fast_counter.sh
[new file with mode: 0644]
patch
|
blob
diff --git a/scripts/files/fast_counter.sh
b/scripts/files/fast_counter.sh
new file mode 100644
(file)
index 0000000..
c40e33a
--- /dev/null
+++ b/
scripts/files/fast_counter.sh
@@ -0,0
+1,7
@@
+
+
+for dir in "${@}"; do
+ /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v "$dir\/.*:$" | wc
+done
+
+