Spaces in a file name need to be escaped or quoted when used in a shell. Do you consider spaces to be "unsafe"? Are spaces "special"?

Quote Originally Posted by Yonut View Post
Just out of curiosity, are you a Millennial or younger?
Why would my age matter? I've been putting spaces in file names since I've started using *nix in the '90s, and I've never thought of them as "unsafe". I also used spaces in file names back when I still used Windows (which has supported spaces and long file names since '95). I never thought of them as unsafe in Windows either. Otherwise, Windows folders like "Documents and Settings" and "Program Files" would be considered "dangerous".

My Unix systems professor in college threw a fit when I wrote defensive shell scripts with quotes around file name variables. My rationale is that any user might use my script, even someone migrating to/from Windows, where a file name might look like "/mnt/to/windows/Documents and Settings/Joe Bob/Cat Video!.wmv". Better to support "unsafe" characters than to force a user to rename their files only because your script can't handle them.