View Single Post
Old Mar 24th, 2008, 8:18 PM   #8
estergon
Newbie
 
estergon's Avatar
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 estergon is on a distinguished road
Re: Spaces in path names

Quote:
Originally Posted by Jabo View Post
It may have something to do with whether or not you're using single or double quotes if you have variables in your script somewhere that have a name in your directory path. If so, you will have to either use single quotes or use an escape character to ignore the variable. More Info

$ HDA1="\"/mnt/hda1/Documents and Settings\""
$ echo $HDA1
"/mnt/hda1/Documents and Settings"
$ cd $HDA1
bash: cd: "/mnt/hda1/Documents: No such file or directory

It may be since you are using HDA1 as a variable, and hda1 is in your path, that you may have to escape the hda1 to get it to work; or use single quotes.

I tried all possible combinations with double quotes, single quote, slashs, backslash in defining the variable all same: linefeeds after space.
I read that
-1 (digit one, not lower L) parameter may prevent new line feed for ls command but I could not implement it to cp or mv commands
Thanks for the link by the way .
__________________
ESTRAGON: We've lost our rights?
VLADIMIR: (distinctly) We got rid of them.
estergon is offline   Reply With Quote