Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510
I have a number of directories with spaces in their names. I wanted to
write a script that steps through them but found it was difficult to cd
to dirs with spaces. Would someone mind giving me a few suggestions?
$ mkdir "My Directory With Spaces"
$ cd "My Directory With Spaces" # works fine
$ cd ..
$ a="cd \"My Directory With Spaces\""
$ echo $a
cd "My Directory With Spaces"
$ $($a) # I thought this would work
bash: cd: "My: No such file or directory
Thanks in advance,
Matthew