str=("path1" "path2" "path3") for s in ${str[@]}; do for file in `find "$s" -name *.png`; do fileName=${file##*/} echo ${fileName%%.*} >> extra done done原文链接:https://www.f2er.com/bash/390495.html
str=("path1" "path2" "path3") for s in ${str[@]}; do for file in `find "$s" -name *.png`; do fileName=${file##*/} echo ${fileName%%.*} >> extra done done原文链接:https://www.f2er.com/bash/390495.html