Re: Whitespace in dir names (bash script problem)



Responding to Unruh:

Mike <Not@xxxxxxxxxxx> writes:



The line...

target_dir="/mount/MP3 Player"

barfs (all references) with a "binary operator expected" (it reads the
MP3 bit, then treats the whitespace as a lead to a parameter, or
something?)

Yes. Why in the world are you using whitespace in a directory name. It
is silly and vexatious. replace the space with a - or _ or some other
printable character.



[...]

The easiest way is "Don;t name directories with white space. It is just
silly.


You are right of course, dir names with spaces in them are not only a
form of Windows emulation, which is a dumb thing to do to start with, but
a PITA to work with, for no good reason.

Pity the guys working on the HAL automounting systems thought
differently. This is what the default setup names my "MP3 Player".

This needs fixing in the HAL system IMO.

Anyhoo... workaround now in place. Thanks guys.

--
*===( http://principiadiscordia.com/
*===( http://www.badphorm.co.uk/
*===( http://www.zenwalk.org/
.



Relevant Pages

  • Re: Whitespace in dir names (bash script problem)
    ... On 2008-07-31, Mike wrote: ... MP3 bit, then treats the whitespace as a lead to a parameter, or ... the assignment is made without any problem. ...
    (alt.os.linux)
  • Re: Whitespace in dir names (bash script problem)
    ... barfs 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 ... ls /mount/MP3 Player ...
    (alt.os.linux)
  • Re: Whitespace in dir names (bash script problem)
    ... Mike writes: ... MP3 bit, then treats the whitespace as a lead to a parameter, or ... Why in the world are you using whitespace in a directory name. ... The easiest way is "Don;t name directories with white space. ...
    (alt.os.linux)