Fixed an annoying bug in my tar backup wrapper scripts where I was getting all the existing files and then deleting the oldest until I was down to X backups. This worked unless the file path had spaces in (e.g. /media/paul/WD Backup Drive). I tried faffing about with IFS, read, find -print0, sort -z etc. but couldn't get them to work.
Then I realised the spaces would never be in the filenames, only the path. So I did:
cd ${PATH}
// find and delete backups using '.'
cd -