Write a Shell Script to Delete a directory
Solution:
Output:
Enter the name of the directory to be deleted
abc
Solution:
echo " Enter the name of the directory to be deleted"
read s
c=`ls $s | wc -l`
if test $c = 0
then
rmdir $s
else
rm -r $s
fi
Enter the name of the directory to be deleted
abc
No comments:
Post a Comment