Handling filenames with space and unusual characters
So many answers can be simplified and easier understood, when these edge cases are omitted. So the question Why does my shell script choke on whitespace or other special characters? provides a canonical method to handle filenames with uncommon characters. #()%^*space* *newline* [];'@:<>,.
Filenames to test your shell script against
How can I test my shell script's file-handling robustness?