Hmm I'd say mostly because it used not to have to.
Indeed it would break quite a few things.
The standard separator for command line parameters, for example, is the
space character.
The usual way of parsing is to break up the parameters based on the number
of spaces so things like $1 $2 $3 work in shell scripts.
I suspect in order to stay posix compliant (i.e. not break earlier software)
you would have to either use quoted strings when referring to files with
spaces, or do what MacOSX does and use the backslash symbol before the
space.
While we are on that topic, I would imagine if you supported UTF8 / i8n then
the space problem kind of goes away because all filenames then become
somewhat "unprintable".

Regards,

Jill. 

-----Original Message-----
From: Stuart Guthrie [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 August 2003 9:52 AM
To: [EMAIL PROTECTED]
Subject: [SLUG] basename & files and paths with embedded spaces


Bug or feature:
I'm wondering why the standard basename and dirname commands in gnu do 
not handle spaces in file names and paths. I guess there is a good 
reason why we need to code around it - ie it would break lots of other 
stuff to fix it.

Question:
Is there any /bin/sh script out there that handles this? Googling has so 
far been fruitless.  Looks like I might have to bsh it.


Stu


-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

----------------------------------------------------------------------
IMPORTANT NOTICES
This email (including any documents referred to in, or attached, to this
email) may contain information that is personal, confidential or the subject
of copyright or other proprietary rights in favour of Aristocrat, its
affiliates or third parties. This email is intended only for the named
addressee. Any privacy, confidence, copyright or other proprietary rights in
favour of Aristocrat, its affiliates or third parties, is not lost because
this email was sent to you by mistake.

If you received this email by mistake you should: (i) not copy, disclose,
distribute or otherwise use it, or its contents, without the consent of
Aristocrat or the owner of the relevant rights; (ii) let us know of the
mistake by reply email or by telephone (+61 2 9413 6300); and (iii) delete
it from your system and destroy all copies.

Any personal information contained in this email must be handled in
accordance with applicable privacy laws.

Electronic and internet communications can be interfered with or affected by
viruses and other defects. As a result, such communications may not be
successfully received or, if received, may cause interference with the
integrity of receiving, processing or related systems (including hardware,
software and data or information on, or using, that hardware or software).
Aristocrat gives no assurances in relation to these matters.

If you have any doubts about the veracity or integrity of any electronic
communication we appear to have sent you, please call +61 2 9413 6300 for
clarification.
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to