I am having a problem handling directories that contain spaces. I guess it is a matter of using quotes properly but I cannot seem to come up with the correct syntax. My first problem is passing such a directory to a script such that it is treated as a single argument rather then individual arguments. For example:
Instead of $1 containing the entire string, it contains: '/Volumes/USER1/Common/This'. Can someone help me with the syntax for dealing with this? TIA.
Code:
myscript "/Volumes/USER1/Common/This is a directory"