diff --git a/bash/bash2.sh b/bash/bash2.sh index 2f8a1f9..4482da8 100644 --- a/bash/bash2.sh +++ b/bash/bash2.sh @@ -1,2 +1,12 @@ -function countfiles() { -} +function countlines(){ +if [ $# == 0 ]; +then + echo "No arguments given. Usage: countfiles dir1 dir2 ..." +else + for i in $@ + do + echo $i has $(cd $i | ls -1a | wc -l) files + done +fi + } +