I tried
export TASK=$HOME/Ubuntu\ One and export TASK="$HOME/Ubuntu One"
but neither works.
|
I tried export but neither works. |
||||
|
It's not the definition you're having issues with, it's the use.You need to wrap wherever you're using the variable in quotes. See this example:
|
|||
|
|
|
Try
In both exports you issued, when you echo $TASK, the result is
This is not the expected behavior because when you write something like
bash will expand it to
which is, of course, incorrect. Therefore, we need to put our path in quotation marks, and escape the space. |
|||
|
|
This page explains the issue in detail. It's a good idea to read it thoroughly http://mywiki.wooledge.org/Arguments |
|||
|
|
|
This awkward and clumsy behaviour is the result of an unwise choice in the name of the "Ubuntu One" directory. Unfortunately, there seems to be no fix planned for this. One option is to use Dropbox, which offers similar functionality. |
|||
|
|
|
Rather than resorting to Dropbox, I made a symbolic link:
In my particular case I wanted to import python modules from a directory on my cloud:
I agree, it is idiotic to put spaces in linux filenames. |
||||
|
|
TASKorPATH? Are you settingPATHusingTASK? If so, how? – Mikel Feb 14 '11 at 22:54