Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Mar 24th, 2008, 5:58 PM   #1
estergon
Newbie
 
estergon's Avatar
 
Join Date: Mar 2008
Posts: 8
Rep Power: 0 estergon is on a distinguished road
Spaces in path names

Hello Everyone,
I am new here and just started shell scripting.
I thought I would start with creating a shell script as a solution to one of my problems.
I need some help with variables and path names (especially spaces in pathnames) here.
I am trying to use my firefox bookmarks on linux with that on windows synchronously but I am getting errors with the path variable for the windows profile folder since it has spaces in its pathname.
For Example:
$ cd /mnt/hda1/Documents\ and\ Settings/
will work, where
$ HDA1="/mnt/hda1/Documents\ and\ Settings/"
$ cd $HDA1
will give such error:
bash: cd: /mnt/hda1/Documents\: No such file or directory

With/out quotes, backslashes, all same.. I understand that shell does not like spaces. What should I write instead since I cannot change the pathname? Any suggestions please?

Thank in advance
__________________
ESTRAGON: We've lost our rights?
VLADIMIR: (distinctly) We got rid of them.
estergon is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Removing double spaces with str_replace davil PHP 2 Dec 12th, 2007 5:19 PM
adding csc to Path Environment pr0gm3r C# 6 Sep 9th, 2005 8:52 AM
seeking best path algorithm lhk_mgtf2008 Visual Basic 9 Jun 9th, 2005 8:11 PM
How create variables to hold directory names on Windows? noleander Bash / Shell Scripting 5 Mar 7th, 2005 10:18 AM
MYSQL, pipe delimited or just spaces? scorpiosage PHP 0 Feb 8th, 2005 3:32 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 4:22 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC