Hi,
i would like to rename files in directories and subdirs.
Files contains specific french or strange caracters.
I want to replace all non alpha-numerics by _ (underscore)
First, i made this, but i think the "for" is limited.
How can i do this directly by FIND ?
for file in $(find . -name "*.model"); do
mv "$file" `echo "$file" | sed 's/[^A-Za-z0-9_./]/_/g'`
done
If I replace by :
Find . -name "*.model" -exec mv "{}" `echo "{}" | sed 's/[^A-Za-z0-9_./]//g'` \;
i got lot of lines with "__".
Can somebosy help me ?
THX