I created a bunch of folders from modification dates, like these: .. 2012-11-29 2012-11-20 ..
Now I want to move files into these folders, in case the have a modification date that equals the folders name. The files contain whitespace in their names.
If I run this I get a list that looks like the folder names:
find . -iname "*.pdf" -print0 | while read -d $'\0' file; do stat -c "%.10y" "$file"; done
How do I take this output and use it in a script that moves these files like (pseudocode):
find . -iname "*.pdf" -print0 | while read -d $'\0' file; do mv $<FILEWITHWHITESPACEINNAME> <FOLDERNAMEDLIKE $file stat -c "%.10y" "$file" > ; done