#!/bin/bash for C in * do if [[ -d $C ]] && [[ $C != "profiles" ]]; then for E in $C/* do if [[ -d $C ]]; then echo "* $E" fi done fi done