Mail Archives: djgpp/2002/12/12/23:30:13
On 13 Dec 2002, A. Sinan Unur wrote:
>
> "Arthur J. O'Dwyer" <ajo AT andrew DOT cmu DOT edu> wrote in news:Pine.GSO.4.44L-
> 027 DOT 0212122221540 DOT 23334-100000 AT unix14 DOT andrew DOT cmu DOT edu:
> > On 13 Dec 2002, A. Sinan Unur wrote:
> >> "Arthur J. O'Dwyer" <ajo AT andrew DOT cmu DOT edu> wrote in news:Pine.GSO.4.44L-
> >> 027 DOT 0212122147030 DOT 22577-100000 AT unix14 DOT andrew DOT cmu DOT edu:
> >> >
> >> > [A. Sinan Unur wrote: something suggesting I clarify my question.]
> >> >
> >> > On Thu, 12 Dec 2002, Arthur J. O'Dwyer wrote:
> >>
>
> > The (error-corrected) Request still stands, I suppose; and I still
> > believe the default behavior to be a bug in the implementation.
> > Notice that the "globbing" doesn't complain about mismatched quotes,
> > and makes some argument values impossible to construct.
>
> OK. So, the problem is that when you invoke test as
>
> C:\Dload\misc>test "*\\" hello
>
> you get the output
>
> :*\" hello:
>
> instead of the intended
>
> :*\:
> :hello:
>
> That indeed looks like a bug in that one expects \\ to mean \.
Mm-hm. I think it's a bug in the globbing code.
> I don't know if one of
>
> C:\Dload\misc>test "*\ " hello
> :*\ :
> :hello:
>
> or
>
> C:\Dload\misc>test "*"\ hello
> :*\:
> :hello:
>
> is acceptable to you.
The second one certainly looks like it satisfies The Request, although
in an ideal world (with correct globbing), the second one would/should
produce some sort of error.
> If you are writing a tr-clone, your best bet might be to disable globbing
> (i think this is not so bad since globbing is meant to work with file
> names).
Yeah, that's what I've done as a stopgap measure. But it would be
nice if globbing worked correctly, so one could invoke a program as
% tr -d '*\' *.txt
and have it work as expected. I don't know why I'd want to delete all
asterisks and backslashes in all my text files, but it would be nice
if it were _possible_. (And yes, that's not quite standard 'tr' syntax,
but if I could get the argument globbing to work properly, that would
be the next extension I'd make...)
Sorry about the / \ mistake again.
-Arthur,
who is sending a bug report to delorie.com as we speak
- Raw text -