From nobody@FreeBSD.org  Wed Oct  5 09:04:50 2005
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 294F816A41F
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Oct 2005 09:04:50 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EBBC043D45
	for <freebsd-gnats-submit@FreeBSD.org>; Wed,  5 Oct 2005 09:04:49 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j9594n6M077012
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 5 Oct 2005 09:04:49 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j9594nsY077011;
	Wed, 5 Oct 2005 09:04:49 GMT
	(envelope-from nobody)
Message-Id: <200510050904.j9594nsY077011@www.freebsd.org>
Date: Wed, 5 Oct 2005 09:04:49 GMT
From: Jack Low <xxjack12xx@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: rm wildcards is not rming files with brackets
X-Send-Pr-Version: www-2.3

>Number:         86931
>Category:       bin
>Synopsis:       rm wildcards is not rming files with brackets
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 05 09:10:19 GMT 2005
>Closed-Date:    Sat Oct 08 19:48:49 GMT 2005
>Last-Modified:  Sat Oct 08 19:48:49 GMT 2005
>Originator:     Jack Low
>Release:        6.0-BETA5
>Organization:
>Environment:
FreeBSD musirc.com 6.0-BETA5 FreeBSD 6.0-BETA5 #0: Mon Sep 19 22:30:57 PDT 2005     jack@musirc.com:/usr/obj/usr/nsrc/sys/MUSIRC  i386

>Description:
%rm /*/*/*/*/*/*/*-file-in-this*
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
%                                                            

I have replaced the path with /hidden to hide the confidential directories
>How-To-Repeat:
rm *wildcard on a directory with square brackets
>Fix:
if square brackets are seen, escape them.
>Release-Note:
>Audit-Trail:

From: Giorgos Keramidas <keramida@freebsd.org>
To: Jack Low <xxjack12xx@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: bin/86931: rm wildcards is not rming files with brackets
Date: Thu, 6 Oct 2005 07:52:51 +0300

 On 2005-10-05 09:04, Jack Low <xxjack12xx@gmail.com> wrote:
 > %rm /*/*/*/*/*/*/*-file-in-this*
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > rm: /hidden/---[No-SFV-file-in-this-directory]-: No such file or directory
 > %
 
 Are you sure this isn't some nasty trick csh(1) plays to you?
 
 Using GNU bash and /bin/sh here I see quite different things:
 
 : $ mkdir /tmp/keramida
 : $ cd /tmp/keramida
 : $ touch '[foo]'
 : $ ls -l
 : total 0
 : -rw-rw-r--  1 keramida  wheel  - 0 Oct  6 07:49 [foo]
 : $ rm *foo*
 : $ ls -l
 : total 0
 : $ env PS1='sh> ' sh
 : sh> pwd
 : /tmp/keramida
 : sh> ls -la
 : total 4
 : drwxrwxr-x   2 keramida  wheel   512 Oct  6 07:49 .
 : drwxrwxrwt  10 root      wheel  1536 Oct  6 07:50 ..
 : sh> touch '[foo]'
 : sh> ls -l
 : total 0
 : -rw-rw-r--  1 keramida  wheel  0 Oct  6 07:50 [foo]
 : sh> rm *foo*
 : sh> ls -l
 : total 0
 : sh>

From: "Jack L." <xxjack12xx@gmail.com>
To: bug-followup@FreeBSD.org, xxjack12xx@gmail.com
Cc:  
Subject: Re: bin/86931: rm wildcards is not rming files with brackets
Date: Wed, 5 Oct 2005 23:02:41 -0700

 ------=_Part_35536_13339861.1128578561237
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 Hmm... it's not doing it anymore, I suppose it is csh playing nasty tricks
 as usual.
 
 ------=_Part_35536_13339861.1128578561237
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: inline
 
 Hmm... it's not doing it anymore, I suppose it is csh playing nasty tricks =
 as usual.<br>
 
 ------=_Part_35536_13339861.1128578561237--
State-Changed-From-To: open->closed 
State-Changed-By: keramida 
State-Changed-When: Sat Oct 8 19:47:18 GMT 2005 
State-Changed-Why:  
Submitted says the problem cannot be reproduced now and was, 
very likely, a csh(1) quoting problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=86931 
>Unformatted:
