[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Directories with spaces
From: |
Matthew Walker |
Subject: |
Directories with spaces |
Date: |
Thu, 09 Sep 2004 14:49:04 +1200 |
User-agent: |
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
- Directories with spaces,
Matthew Walker <=