In order to write files to a USB volume I want to rename filenames containing '?', '"', '*' or ':' to replace any of these characters with a space. But I'm having trouble with the '*'. My bash script is
for file in * do mv -v "'"$file"'" "'"$(echo "$file" | sed 's/\(.*\)[?"*:]\(.*\)/\1 \2/')"'" done
The '*' keeps getting expanded into the filenames in the current directory. I've tried using
but then the initial 'in *' doesn't work.