Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-02-2008, 04:26 PM   #1
Registered: Aug 2003
Posts: 365

Rep: Reputation: 30
spaces and odd characters in directory name in bash?

i need to script a directory change in bash.
the directory in question is a mounted windows

/home/xfers/mnt/D200/Capture (E)/orig

i'm getting an error when i script this:

cd /home/xfers/mnt/D200/Capture\ (E)/orig

how do i script this directory change in
view of its having both a space and parentheses
in its name? i was trying the \ but, obviously,
that either doesn't work or i've got the syntax
wrong. it's the 'Capture (E)' that's the issue.

Old 04-02-2008, 04:28 PM   #2
Registered: Aug 2003
Posts: 365

Original Poster
Rep: Reputation: 30
nevermind. this did it:

cd "/home/xfers/mnt/D200/Capture (E)/orig"



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spaces in bash parameters rose_bud4201 Programming 5 03-11-2005 07:57 AM
Spaces in filenames with BASH edenning Programming 12 01-27-2005 08:10 AM
bash and filenames with spaces doctorwebbox Linux - General 2 12-15-2004 09:55 PM
Help! Null Characters to spaces FoxyNewbie Programming 7 05-27-2004 01:10 PM
cd to a directory with spaces? GT_Onizuka Linux - Newbie 3 08-28-2003 06:00 PM

All times are GMT -5. The time now is 05:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration