Computer Science, asked by TbiaSamishta, 11 months ago

Write a shell script to count and report the number of entries present in each subdirectory mentioned in the path, which is supplied as a command-line argument.

Answers

Answered by aqibkincsem
1

The basis script for counting and reporting the number of entries in each subdirectory is mentioned in the math. if [ $# -eq 0 ];


then;  echo "Enter path : "; read path; else path=$1; fi for dir in `ls -R $path` doif [ -e $dir ]  then vcount=`expr $vcount+1` echo $dir fi done echo "There is $vcount file"

Similar questions