Q:

why are files and directories with space in their names ignored in bash?

I have a script, which is supposed to go through directories and subdirectories of where it gets executed and search for specific file types, say pdf, and delete them and then creates an empty file with the deleted file's name. 
It works fine except that it ignores files and folders, which contain space(s) in their names.
Here is the script:
#!/bin/sh

#
#  Created by User on 6/20/11.
#

dir=./
for files in $(find -L "$dir" -name '*.pdf' -mtime +90);
do
echo $files
rm -fR $files
touch $files.removed
done

Can any one suggest a solution how to make this script taking care of all files and folders with any kind of name?
Thanks and best regards

A:

The default value of IFS causes word splitting upon encountering spaces.  Say:
for files in $(IFS=$'\n' find -L "$dir" -name '*.pdf' -mtime +90);

Saying IFS=$'\n' above would cause word splitting to happen only on newlines, so filenames with spaces would work well.

