Date: prev next · Thread: first prev next last
2016 Archives by date, by thread · List index


Spaces in a filename are a pain in all Unix/Linux command line actions. 

This is because a space is a delimiter, unless within quotes or escaped.
In shell scripts quotes and escapes (\  ) are interpreted, so any sub script does not get them, 
unless specific actions are taken, e.g. un Unix use single quotes around double quotes, so that the 
double quotes are sent to the called script. 

Anyway, spaces in a filename is really a pain..


On 15 mei 2016, at 00:53, Cley Faye wrote:

2016-05-14 9:23 GMT+02:00 Tom Davies <tomcecf@gmail.com>:

I've never understood why underscores are so popular.


​On that particular topic: ​even if almost all OS got support for spaces in
file names (some later than others...), remember that spaces are also used
as a separator in a lot of things.

Obviously, good programming and carefulness can avoid almost all issues,
but the amount of code that's either quickly written, or old, or
unmaintained, or anything, that will not handle spaces in filenames is
frightening. Shell scripts are a major contender of course, but some
"higher level" programs can also mess things, if only by passing arguments
to other programs or ignoring some FS-specific restrictions, etc.
Add to that the inconsistencies (mainly from ONE os though... cough cough)
and avoiding spaces in filenames (as well as avoiding other uncommon
characters) is a sure-fire way to avoid any issue when working with all
that.

Not later than today I found myself giving the path of a file to a program,
only to find out that that specific program will cut arguments *itself* on
the spaces, in addition to taking multiple arguments. The developer
probably never understood why he gets multiple values in argv[], but still.

​If only we could fix all the bad code out there​... ;)

-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted


-- 
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.