## unset variables defined only for this file
unset filename flag_pat_match;
done < <(find "$dir" -mindepth 1 -maxdepth 1 -type f 2>/dev/null);
## unset variables defined only for this file
unset filename flag_pat_match;
done < <(find "$dir" -mindepth 1 -maxdepth 1 -type f 2>/dev/null);