LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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: 419

Rep: Reputation: 31
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: 419

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

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


BabaG
 
  


Reply



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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:58 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration