Whitespace in dir names (bash script problem)
- From: Mike <Not@xxxxxxxxxxx>
- Date: Thu, 31 Jul 2008 23:15:04 GMT
barfs (all references) with a "binary operator expected" (it reads the
MP3 bit, then treats the whitespace as a lead to a parameter, or
The best info I could dig up says that escaping the whitespace with a
backslash is the way to go here, but...
target_dir="/mount/MP3\Player" (This reads as "MP3Player")
....all barf too.
For practice, I've been doing...
ls /mount/MP3 Player (no such file or directory)
ls /mount/MP3\ Player (no such file or directory)
....and so on, as this generates the same problem a little easier than
constantly hacking the script.
Anybody got a clue on how to get a bash script variable to read a dir
name with whitespace in it? As the automounter assigns this troublesome
name, I think I'm stuck with it for now. :(
- Prev by Date: nfs
- Next by Date: Re: nfs
- Previous by thread: nfs
- Next by thread: Re: Whitespace in dir names (bash script problem)