From: Ben Finney on
Barry Margolin <barmar(a)alum.mit.edu> writes:

> I guess you don't work with people who mostly work in GUIs rather than
> CLIs. It's very common for them to use phrases when naming files. E.g.
> "September Expenses" rather than "september-expenses".

Heck, I do it quite often, and I've been a committed CLI user for most
of my life at the computer. The space is a perfectly valid character in
filenames, it can often make for a more reasonable filename, and tools
that use filenames need to handle all valid characters; that's why the
shell has easy quoting for parameters.

Avoiding reasonable filenames in an effort to pander to bad tools (e.g.
badly-written shell scripts) is short-sighted and false economy. Fix the
bad tools so they handle any valid filename.

--
\ “Visitors are expected to complain at the office between the |
`\ hours of 9 and 11 a.m. daily.” —hotel, Athens |
_o__) |
Ben Finney
From: Barry Margolin on
In article <87pr8hb3pu.fsf(a)benfinney.id.au>,
Ben Finney <bignose+hates-spam(a)benfinney.id.au> wrote:

> Barry Margolin <barmar(a)alum.mit.edu> writes:
>
> > I guess you don't work with people who mostly work in GUIs rather than
> > CLIs. It's very common for them to use phrases when naming files. E.g.
> > "September Expenses" rather than "september-expenses".
>
> Heck, I do it quite often, and I've been a committed CLI user for most
> of my life at the computer. The space is a perfectly valid character in
> filenames, it can often make for a more reasonable filename, and tools
> that use filenames need to handle all valid characters; that's why the
> shell has easy quoting for parameters.

I think most CLI users don't use these types of names because it
requires extra typing to quote them.

touch foobar

vs.

touch "foo bar"

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
From: Ben Finney on
Barry Margolin <barmar(a)alum.mit.edu> writes:

> In article <87pr8hb3pu.fsf(a)benfinney.id.au>,
> Ben Finney <bignose+hates-spam(a)benfinney.id.au> wrote:
>
> > Barry Margolin <barmar(a)alum.mit.edu> writes:
> >
> > > I guess you don't work with people who mostly work in GUIs rather
> > > than CLIs. It's very common for them to use phrases when naming
> > > files. E.g. "September Expenses" rather than "september-expenses".
> >
> > Heck, I do it quite often, and I've been a committed CLI user for
> > most of my life at the computer. The space is a perfectly valid
> > character in filenames, it can often make for a more reasonable
> > filename, and tools that use filenames need to handle all valid
> > characters; that's why the shell has easy quoting for parameters.
>
> I think most CLI users don't use these types of names because it
> requires extra typing to quote them.
>
> touch foobar
>
> vs.
>
> touch "foo bar"

That's fine, and I also do that: deliberately avoiding special
characters in file names if those names are more an interface between
programs rather than an interface to the user.

But it's false to then claim that using the space character in a
filename somehow makes one less worthy of the CLI, or making some kind
of mistake that “true CLI users” are wise enough to avoid. (You didn't
quite do this, but I detect it often, and this thread is no exception.)

Rather, the space is a normal character in filenames; those who avoid it
are actively limiting themselves in comparison to those who use it
freely, and that limitation should be recognised.

--
\ “Kissing a smoker is like licking an ashtray.” —anonymous |
`\ |
_o__) |
Ben Finney
From: Grant on
On Thu, 22 Oct 2009 08:48:29 +1100, Ben Finney <bignose+hates-spam(a)benfinney.id.au> wrote:

>Barry Margolin <barmar(a)alum.mit.edu> writes:
>
>> In article <87pr8hb3pu.fsf(a)benfinney.id.au>,
>> Ben Finney <bignose+hates-spam(a)benfinney.id.au> wrote:
>>
>> > Barry Margolin <barmar(a)alum.mit.edu> writes:
>> >
>> > > I guess you don't work with people who mostly work in GUIs rather
>> > > than CLIs. It's very common for them to use phrases when naming
>> > > files. E.g. "September Expenses" rather than "september-expenses".
>> >
>> > Heck, I do it quite often, and I've been a committed CLI user for
>> > most of my life at the computer. The space is a perfectly valid
>> > character in filenames, it can often make for a more reasonable
>> > filename, and tools that use filenames need to handle all valid
>> > characters; that's why the shell has easy quoting for parameters.
>>
>> I think most CLI users don't use these types of names because it
>> requires extra typing to quote them.
>>
>> touch foobar
>>
>> vs.
>>
>> touch "foo bar"
>
>That's fine, and I also do that: deliberately avoiding special
>characters in file names if those names are more an interface between
>programs rather than an interface to the user.
>
>But it's false to then claim that using the space character in a
>filename somehow makes one less worthy of the CLI, or making some kind
>of mistake that “true CLI users” are wise enough to avoid. (You didn't
>quite do this, but I detect it often, and this thread is no exception.)
>
>Rather, the space is a normal character in filenames; those who avoid it
>are actively limiting themselves in comparison to those who use it
>freely, and that limitation should be recognised.

Yes, I avoid spaces in filenames (using - or _ instead), but one needs
to allow for 'foreign' files containing spaces. Must admit I've never
met a file with embedded newlines -- so it's a bit of an odd thing to
see the frequent 'assuming no newline in filename' mentioned here.

Fat-fingering the keyboard at the wrong (right?) moment can create some
odd situations with unintended files, named oddly :)

Tab completion usually escapes the odd characters for me though, so
it's not too bad to recover from.

Grant.
--
http://bugsplatter.id.au
From: Barry Margolin on
In article <873a5cbeqa.fsf(a)benfinney.id.au>,
Ben Finney <bignose+hates-spam(a)benfinney.id.au> wrote:

> Barry Margolin <barmar(a)alum.mit.edu> writes:
>
> > In article <87pr8hb3pu.fsf(a)benfinney.id.au>,
> > Ben Finney <bignose+hates-spam(a)benfinney.id.au> wrote:
> >
> > > Barry Margolin <barmar(a)alum.mit.edu> writes:
> > >
> > > > I guess you don't work with people who mostly work in GUIs rather
> > > > than CLIs. It's very common for them to use phrases when naming
> > > > files. E.g. "September Expenses" rather than "september-expenses".
> > >
> > > Heck, I do it quite often, and I've been a committed CLI user for
> > > most of my life at the computer. The space is a perfectly valid
> > > character in filenames, it can often make for a more reasonable
> > > filename, and tools that use filenames need to handle all valid
> > > characters; that's why the shell has easy quoting for parameters.
> >
> > I think most CLI users don't use these types of names because it
> > requires extra typing to quote them.
> >
> > touch foobar
> >
> > vs.
> >
> > touch "foo bar"
>
> That's fine, and I also do that: deliberately avoiding special
> characters in file names if those names are more an interface between
> programs rather than an interface to the user.
>
> But it's false to then claim that using the space character in a
> filename somehow makes one less worthy of the CLI, or making some kind
> of mistake that “true CLI users” are wise enough to avoid. (You didn't
> quite do this, but I detect it often, and this thread is no exception.)
>
> Rather, the space is a normal character in filenames; those who avoid it
> are actively limiting themselves in comparison to those who use it
> freely, and that limitation should be recognised.

My point was that in general, GUI users are far more likely to use
special characters in filenames than CLI users. There may be some CLI
users who do it as well, but I expect they're a small minority. Since
the OP didn't realize that filenames with whitespace are an issue, he's
probably never had to write scripts that deal with files created by GUI
users, and his CLI users tend towards the traditional naming styles.
Probably he's only written scripts to work with his own files, rather
than trying to write them more generally.

--
Barry Margolin, barmar(a)alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***