Results 11 to 14 of 14
I don't think we've done anything Bash related.
Jeremy...
- 01-27-2005 #11Linux Guru
- Join Date
- Mar 2003
- Location
- Wisconsin
- Posts
- 1,907
I don't think we've done anything Bash related.
JeremyRegistered Linux user #346571
"All The Dude ever wanted was his rug back" - The Dude
- 01-28-2005 #12Just Joined!
- Join Date
- Jul 2004
- Posts
- 85
This is driving me crazy
All I want is to write a simple script that will take an argument as such:
and would create a directory named "test dir." But it needs the dam space in its name. Becouse it going to go to my MP3 Player, and then the name is going to be extrapolated from the file name, and basically it is going to be mess if I use "_" becouse of the whole linux>win>mac file transfer blah.... Any way, so all I want is the dam directory to have a space in it's name. What am I doing wrong?Code:test "test dir"
Here is a simple version of the script above:
Things I experimented with with no success areCode:$ test "test dir" file=$1 mkdir $file
and it steel does not work. Am I missing something totally stupid here?Code:file=${1//\ /\\ } file="\"$1\"" file="'$1'"
- Bogdan
- 01-28-2005 #13Linux Newbie
- Join Date
- Jul 2004
- Location
- WA, USA
- Posts
- 102
Just curious, why don't you make a partition on your hard drive that is FAT32? Then the compatibility between the systems would be sovled, if that is the only reason you are trying to include spaces.
No, it doesn't solve your problems with bash very well... but it *is* a solution.
Robert PeasleeTaking a walk on the wonderful path computers have lain before me
- 01-28-2005 #14Just Joined!
- Join Date
- Jul 2004
- Posts
- 85
I do not have win on my linux box, it is a headless server down in my garage
So no need for FAT partition. And linux has no problems with names that have spaces, I am sure it is a problem somewhere in my code. I use win on my laptop because linux does not work on my current hardware, ACPI Problem
Any way, if anyone out there feels charitable enough to show me how to pass names with spaces to mkdir inside a bash scrip, I would be grateful.
- Bogdan


Reply With Quote