[TriLUG] Need some help parsing a file

Matthew Frazier leafstormrush at gmail.com
Wed Jan 1 02:19:05 EST 2014


On 12/31/2013 07:26 PM, Steve Litt wrote:
> On Tue, 31 Dec 2013 10:37:08 -0800 (PST)
> John Vaughters <jvaughters04 at yahoo.com> wrote:
>
>>> The tr solution would also reduce repeated spaces in the filename,
>>> so would not work in that (hopefully extreme, but legal) case.
>>
>>
>> Valid point! I can only HOPE that when I am forced to use cut and tr
>> as my only options that Windows developers were not allowed on that
>> system. `,~)
>
> Agreed. As a guy who got into the computer industry in the early
> 1980's, on DEC equipment, I have to say that allowing spaces in
> filenames is obnoxious and unnecessary. That's what the underscore key
> is for. I try very hard to keep all spaces out of filenames. When
> Windows drones send me files whose filenames have spaces, I replace the
> spaces with underscores before saving. And if I have to mail a file
> back, perhaps a filled in version of the PDF they sent me, I leave my
> underscores in. Maybe the Windows guys will finally get it.

Underscores are visible (and kind of ugly), spaces are not. There's a 
pretty immediate difference in terms of ease of reading (for humans, 
which are the people who the computers are supposed to be working for). 
Spaces are also much easier to type, considering that your thumb is 
floating over the spacebar all the time.

Besides, properly written software can deal with filenames containing 
any character you can type into a "Save" dialog. Avoiding spaces is only 
beneficial to deal with software that isn't properly handling "special" 
characters in filenames, which puts you at risk for bugs and security 
flaws anyway.

I use my terminal regularly, and _if_ I'm going for UNIX-friendliness in 
my filenames, I go all the way: lowercase ASCII letters with hyphens 
only. But this is just a personal preference, to make it slightly easier 
to move around in my terminal. If I'm working with files in a GUI 
application, I have no problems with using spaces in filenames -- it's 
easier to type, easier to read, and if I need to deal with them from the 
terminal, my shell and the other tools I use have absolutely no problems 
(I might just have to hit " before typing the name).

In conclusion, there is no real reason to pick on the space character as 
something unsuitable for use in filesystems. This post is probably 200 
more words than I really should have written about this subject.

> SteveT
>
> Steve Litt                *  http://www.troubleshooters.com/
> Troubleshooting Training  *  Human Performance
-- 
Thanks,
Matthew Frazier
http://leafstorm.us


More information about the TriLUG mailing list