URDINESH: SHELL SCRIPT TO GET NO OF SUBDIRECTORY IN CURRENT DIRECTORY
Showing posts with label SHELL SCRIPT TO GET NO OF SUBDIRECTORY IN CURRENT DIRECTORY. Show all posts
Showing posts with label SHELL SCRIPT TO GET NO OF SUBDIRECTORY IN CURRENT DIRECTORY. Show all posts

Tuesday, July 21, 2015

SHELL SCRIPT TO GET NO OF SUBDIRECTORY IN CURRENT DIRECTORY

ALL SUBDIRECTORY IN CURRENT DIRECTORY:

echo "to display all sub directory"
for i in *
do
if [ -d $i ]
then
echo $i "is an directory"
fi
done





OUTPUT:

[@localhost ~]$ sh subdirt.sh
to display all sub directory
123 is an directory

324@86 is an directory

Followers