updated fast counter with docs
[feisty_meow.git] / scripts / files / fast_counter.sh
1
2
3 for dir in "${@}"; do
4   /bin/ls -1fR "$dir" | grep -v "^$" | grep -v "^\.$" | grep -v "^\.\.$" | grep -v ".*:$" | wc -l
5
6     # patterns that remove files from being counted, above:
7     #
8     # ^$       -- all blank lines
9     # ^\.$     -- all lines with just a dot (current directory)
10     # ^\.\.$   -- all lines with just two dots (parent directory)
11     # .*:$     -- all lines that end with a colon (directory heading from recursive ls)
12 done
13
14