www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/12/23:15:13

From: "A. Sinan Unur" <asu1 AT c-o-r-n-e-l-l DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Bug in command-line globbing
Date: 13 Dec 2002 04:02:06 GMT
Organization: Cornell University
Lines: 57
Sender: asu1 AT cornell DOT invalid (on pool-141-149-207-54.syr.east.verizon.net)
Message-ID: <Xns92E2EA54AD0F2asu1cornelledu@132.236.56.8>
References: <Pine DOT GSO DOT 4 DOT 44L-027 DOT 0212122221540 DOT 23334-100000 AT unix14 DOT andrew DOT cmu DOT edu>
NNTP-Posting-Host: pool-141-149-207-54.syr.east.verizon.net
X-Trace: news01.cit.cornell.edu 1039752126 8797 141.149.207.54 (13 Dec 2002 04:02:06 GMT)
X-Complaints-To: usenet AT news01 DOT cit DOT cornell DOT edu
NNTP-Posting-Date: 13 Dec 2002 04:02:06 GMT
User-Agent: Xnews/5.04.25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

"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 \.

I don't know if one of

C:\Dload\misc>test "*\ " hello
:*\ :
:hello:

or

C:\Dload\misc>test "*"\ hello
:*\:
:hello:

is acceptable to you.

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).

-- 
A. Sinan Unur
asu1 AT c-o-r-n-e-l-l DOT edu
Remove dashes for address
Spam bait: mailto:uce AT ftc DOT gov

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019