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:
44278f4
)
fixed to make a nicer output and to not show the directory one's in.
author
Chris Koeritz
<fred@gruntose.com>
Tue, 5 Mar 2013 21:07:14 +0000
(16:07 -0500)
committer
Chris Koeritz
<fred@gruntose.com>
Tue, 5 Mar 2013 21:07:14 +0000
(16:07 -0500)
scripts/files/count_files_in_subdirs.sh
patch
|
blob
|
history
diff --git
a/scripts/files/count_files_in_subdirs.sh
b/scripts/files/count_files_in_subdirs.sh
index d54ee6e82e66a1baacbb49e4c297fe71c89a9d21..7814ca01bc4ca538124cced01c20ed6174293621 100644
(file)
--- a/
scripts/files/count_files_in_subdirs.sh
+++ b/
scripts/files/count_files_in_subdirs.sh
@@
-1,7
+1,9
@@
#!/bin/bash
-dirs=$*
-if [ -z "$dirs" ]; then dirs=*; fi
-for i in $dirs; do
- ls -1 $i | wc | sed -e "s/^ *\([0-9]*\) *.*$/$i: \1/"
+dirs=($*)
+if [ -z "$dirs" ]; then dirs=($(find . -mindepth 1 -maxdepth 1 -type d ) ); fi
+#echo dirs are ${dirs[*]}
+for i in "${dirs[@]}"; do
+ echo -n $(ls -1 $i | wc -l)
+ echo -e "\t\t$i"
done