I have a bunch of excel files I would like to extract recursively from all subdirectories, keeping the directory/file name as the new directory name for all extracted files of each xlsx.to extract a file I found this. Unfortunately my bash knowledge lacks the skill to so all in one command. So I tried to split it up in smaller parts first:for z in ./*do name=${z%%_*}; dest=.${name//[ .-]/}; mkdir $dest;doneif I try that the * in for z in ./*searches for all files in the current directory and not like I had anticipated the result from find . -name *.xlsxso I tried if I could maybe reverse it:for f in | find . -name *.xlsx; do d=${f}; mkdir -p $dbut it obviously doesn't work cause my piping is wrong
unpacking recursively all xlsx files into a new directory containing of the original files name
bash;find
Don't know if your split with bash is right.Because I have stopped working with bash a long time ago.But when you want the output of find in a loop, try this :find . -name '*.xlsx' -print0 |    while IFS= read -r -d $'\0' z; do        name=${z%%_*}         dest=.${name//[ .-]/}         mkdir $dest    done