2. What does the following script do?
#!/bin/bash
for f in *
do
if [ -d “$f” ]
then
echo “$f”
fi
done
Answer
It will print all the directory name in the system
-d for directory that filters the directory name
If you want to print all the file name then
Thanks
OR
OR