This question already has an answer here:
- Exclude one pattern from glob match 4 answers
I am using this
for d in ./*/ ; do (cd "$d" && cp -R ../lib . ); done
in a shell script to copy lib folder in all subfolder inside my parent directory . But the lib folder also getting copied inside lib . How to avoid that ?