LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices

Reply
 
Search this Thread
Old 04-02-2008, 03:26 PM   #1
babag
Member
 
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
share:

/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.

thanks,
BabaG
 
Old 04-02-2008, 03:28 PM   #2
babag
Member
 
Registered: Aug 2003
Posts: 365

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

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


BabaG
 
  


Reply


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 06:57 AM
Spaces in filenames with BASH edenning Programming 12 01-27-2005 07:10 AM
bash and filenames with spaces doctorwebbox Linux - General 2 12-15-2004 08:55 PM
Help! Null Characters to spaces FoxyNewbie Programming 7 05-27-2004 12:10 PM
cd to a directory with spaces? GT_Onizuka Linux - Newbie 3 08-28-2003 05:00 PM


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

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