Reputation: 19
I need a shell script to look for regular files in a directory given as argument and count them in order to display their number.
Upvotes: 0
Views: 66
Reputation: 1122
#! /bin/ksh cd $1 list=`ls -l | grep -v '^d' | wc -l` echo $list
Upvotes: 1
Reputation: 165
find /some/path -name "aaa.*" | wc -l
Upvotes: 2