Thank you very much in advance for helping!
I have this code in bash:
for d in this_folder/*
do
plugin=$(basename $d)
ech
You could use find and awk to build the list of directories and then store the result in a variable. Something along the lines of this (untested):
dirs=$(find this_folder -maxdepth 1 -type d -printf "%f\n" | awk '!match($0,/^(global|plugins|css)$/)')
for d in $dirs; do
# ...
done
Update 2019-05-16:
while read -r d; do
# ...
done < <(gfind -maxdepth 1 -type d -printf "%f\n" | awk '!match($0,/^(global|plugins|css)$/)')