bash : name : improve matching.

This commit is contained in:
Dmitry Voronin 2023-10-25 14:40:39 +03:00
parent a3de2b5a61
commit c4cef8a0f8

View file

@ -18,8 +18,11 @@ name()
# extract new name. # extract new name.
new_name=$(echo "$file" | \ new_name=$(echo "$file" | \
sed -e "s/[^[:alnum:]\.]/_/g" \ sed -e "s/ /_/g" \
-e "s/_\+/_/g" -e "s/[^[:alnum:]\._-]//g" \
-e "s/_\+/_/g" \
-e "s/_-_/_/g" \
-e "s/^_\+//"
) )
# status line. # status line.