java-tutorials/linux-bash/loops/src/main/bash/loop_directories.sh

11 lines
131 B
Bash
Executable File

#!/bin/bash
for dir in */; do
echo "$dir"
done
for file in *; do
if [ -d "$file" ]; then
echo "$file"
fi
done