I am trying to create symlinks for multiple directories/files some of which have spaces in the name. The purpose is to keep a clean library, while allowing rtorrent to continue seeding. Thus, I have a watch folder and my library folder and I want to create symlinks in the library folder from the completed files in the watch folder. Here is the script I am using now:

Running the scripts yields:.../Music/Link to Rush, /Link to Credence, /Link to Clearwater, /Link to Revival, and /Link to Jim.Croce

Obviously the /Credence, /Clearwater, and /Revival links don't work because those directories don't exist.

So, I ask: what am I doing wrong/how can I fix this?

As a follow up, is there a way I could automate this, either by scheduling the script to run on a timer/at a set time, or by having it check for a state change in the folder and adding a symlink each time a torrent is completed (i.e. a new folder/file is added to the .watch directory)?

You will have to change a few things. First, redirect the output of the find command to a file instead of assigning it to a variable. Redirecting to a file ensures each result gets written in its own line.

value of LIST is Archivesvalue of LIST is CTP-2011value of LIST is Deployment Guide 2012 - Ubuntu 12.04 LTSvalue of LIST is fix the dock.desktopvalue of LIST is Mga Awitinvalue of LIST is My Templatesvalue of LIST is Noticesvalue of LIST is Photosvalue of LIST is Publicvalue of LIST is rx-radio.shvalue of LIST is Work

Since at any given iteration, $LIST may contain spaces, don't forget to enclose it in double quotation marks to ensure the spaces within the filename is treated as part of the whole parameter instead of being treated as separate parameters.