My recommendation is to use underscores instead of spaces. Underscores are usually the convention that people use when replacing spaces, although hyphens are fine too I'd say. But since hyphens might show up in other ways such as hyphenated words, you'll have more success in preserving a name value by using underscores. For instance, if you have a file called "A picture taken in Winston-Salem, NC.jpg" and you want to convert the spaces to underscores, then you can preserve the hyphen in the name and retain its meaning.
Spaces cause problems for people who want to use the command line in advanced ways such as in for loops like this:
for file in *.mp3 ; do mpg321 $file -w - | oggenc -o ${file%%.mp3}.ogg - ; done
If any of the mp3 files matched by that wildcard have spaces in their name, it will cause the filename to be broken up into sections instead of the whole. You can get around this by changing the BASH shell's IFS variable or using the find command, but its an annoyance and a lot of people don't know this, so it can cause problems.
I doubt this or even a bumper sticker campaign would prevent people from putting spaces in filenames, but if you want to help yourself, more power to you and thank you on behalf of those of us who care.
{...}
. In case of automatic script you should consider it. The_
is used to create a subscript and have to be included e.g. in$...$
to avoid error, but it will generate a text different from what you are expecting. In the enhanced terminal of gnuplot too..