|
passing variable (a path) with spaces
OK, I searched the forums and read that this should work, but it fails...
path="/media/My Passport"
cd $path
ls .
returns "./dupes.sh: line 19: cd: /media/My: No such file or directory"
but, if I escape the space it still fails:
path="/media/My\ Passport"
I have tried all variations I can think of without success... renaming the dir, mounting differently, or linking are not options, I need to deal with paths with spaces...
Andrew
Last edited by aolong; 06-28-2009 at 02:47 PM.
|