for dir in */ ; do echo "${dir%/}" ; done # Use the */ trick to get only the directories, then use ${dir%/} to remove the trailing / from each instance of $dir

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!