From unknown Fri Jun 20 07:11:39 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#78772 <78772@debbugs.gnu.org> To: bug#78772 <78772@debbugs.gnu.org> Subject: Status: Feature request: glob-matching patterns Reply-To: bug#78772 <78772@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:11:39 +0000 retitle 78772 Feature request: glob-matching patterns reassign 78772 grep submitter 78772 Philip Prindeville severity 78772 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Jun 11 23:30:13 2025 Received: (at submit) by debbugs.gnu.org; 12 Jun 2025 03:30:13 +0000 Received: from localhost ([127.0.0.1]:54641 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uPYdp-0004lp-9H for submit@debbugs.gnu.org; Wed, 11 Jun 2025 23:30:13 -0400 Received: from lists.gnu.org ([2001:470:142::17]:59804) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uPYdm-0004fe-OY for submit@debbugs.gnu.org; Wed, 11 Jun 2025 23:30:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uPYdh-0003Tc-4s for bug-grep@gnu.org; Wed, 11 Jun 2025 23:30:05 -0400 Received: from mail.redfish-solutions.com ([24.116.100.90]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uPYdf-0004fn-II for bug-grep@gnu.org; Wed, 11 Jun 2025 23:30:04 -0400 Received: from smtpclient.apple (macbook3-1141.redfish-solutions.com [192.168.8.12]) (authenticated bits=0) by mail.redfish-solutions.com (8.18.1/8.18.1) with ESMTPSA id 55C3TsLW043086 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 11 Jun 2025 21:29:54 -0600 From: Philip Prindeville Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Feature request: glob-matching patterns Message-Id: <75532265-CBC9-4A41-8E15-20C5966D0A64@redfish-solutions.com> Date: Wed, 11 Jun 2025 21:29:35 -0600 To: bug-grep@gnu.org X-Mailer: Apple Mail (2.3826.600.51.1.1) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=redfish-solutions.com; h=from:content-type:content-transfer-encoding:mime-version :subject:message-id:date:to; s=bandit; bh=05HIqGjxc/rbpaphcBQwlQ 7D6GGyWu9vp8cJKz9higU=; b=nLBgB5dUjnTPnhZ17rY4S8kqukb9+2skqpa4te NLKOICGuyFyjn9tBUBwDu/377bAes9e0efVW8mAEDaQIHrDCExTHyt+lxO1MIsZt GFmg2jUm2xVYFuRYiGRNUusdH9DT0iEwMA5k1+DBj+MzIbQFdZdz2YPihvFLpTbq CApwBrLNMTxyvFXwiqrwlBfxakwCWIWekKWRKprLNVjOB4s/e2V0aH8MwuNLUTE2 GONVrONQUAV0wyH6lH47UjNPOs19kSgAToZ31W2XkzF+jP9DsePIKB/0qc0W5Iy+ w35BWpBK9S+qcmRO7BlTnetEzk0Pd9cGkBo8zYJ/GcXwIJuQ== X-Scanned-By: MIMEDefang 3.6 on 192.168.8.3 Received-SPF: pass client-ip=24.116.100.90; envelope-from=philipp@redfish-solutions.com; helo=mail.redfish-solutions.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) It might be useful to have an argument like --glob-regexp to have a file = containing globbing patterns to match (or exclude) against a stream of = filenames. Example: find . -print -depth | grep -v --glob-regexp -f do-not-backup-list | = cpio -ov > filtered-backup.cpio Where files matching glob patterns in "do-not-backup-list" would be = excluded. Thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 13 14:08:14 2025 Received: (at 78772) by debbugs.gnu.org; 13 Jun 2025 18:08:15 +0000 Received: from localhost ([127.0.0.1]:49806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uQ8p3-00034Z-8Q for submit@debbugs.gnu.org; Fri, 13 Jun 2025 14:08:14 -0400 Received: from resqmta-c2p-570503.sys.comcast.net ([2001:558:fd00:56::5]:16490) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uQ8oy-000334-Ne for 78772@debbugs.gnu.org; Fri, 13 Jun 2025 14:08:10 -0400 Received: from resomta-c2p-539727.sys.comcast.net ([96.102.18.242]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resqmta-c2p-570503.sys.comcast.net with ESMTPS id Q3sYuVRU7BW6SQ8osupHuC; Fri, 13 Jun 2025 18:08:02 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1749838082; bh=BFM4EWlpzGgr0O1gE3t3uFrazDqm1jAPrl9LQEeVRlo=; h=Received:Received:Received:Received:From:To:Subject:Date: Message-ID:Xfinity-Spam-Result; b=iVql+YSYD/F9k1d7WKUbhBzNOP6NQ5QRHa9SBwfxAetPlAu1ObpMVTkaKDy7PiT+i shuo2nMzYRFXCI+SDGR3/rT9xPj1nklNfYloWY7mH676Hsme7wk8f7lwd6f3TVR6+N 0mc61TwZ1BAouHmG50pbsT0LzDdncB/fQsDbGaueuJG2aKvcHnPrt6jHDSS4hpIdsX UrPWCDF5tdBPpV40W3BlpU7yCWcjr+zi3VZ7Ju4t5GQArmvfaPXgfDUH6N/dgZ7bIV HomsJ5j84vAyfGRdK6IsAXRVmUlbXQopQ+bPsrxxy1TD/TdMAnnidlKtrGom1EtJEp 0ntcmJV3RJSoA== Received: from hobgoblin.ariadne.com ([IPv6:2601:192:4a00:430::2a80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 256/256 bits) (Client did not present a certificate) by resomta-c2p-539727.sys.comcast.net with ESMTPSA id Q8oquvzf2sDghQ8oruh7ET; Fri, 13 Jun 2025 18:08:01 +0000 Received: from hobgoblin.ariadne.com (localhost [127.0.0.1]) by hobgoblin.ariadne.com (8.16.1/8.16.1) with ESMTPS id 55DI7x6H1453570 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 13 Jun 2025 14:08:00 -0400 Received: (from worley@localhost) by hobgoblin.ariadne.com (8.16.1/8.16.1/Submit) id 55DI7xQK1453567; Fri, 13 Jun 2025 14:07:59 -0400 X-Authentication-Warning: hobgoblin.ariadne.com: worley set sender to Dale.Worley@comcast.net using -f From: "Dale R. Worley" To: Philip Prindeville Subject: Re: bug#78772: Feature request: glob-matching patterns In-Reply-To: <75532265-CBC9-4A41-8E15-20C5966D0A64@redfish-solutions.com> (bug-grep@gnu.org) Date: Fri, 13 Jun 2025 14:07:59 -0400 Message-ID: <87ikkzcy68.fsf@hobgoblin.ariadne.com> X-CMAE-Envelope: MS4xfHmJK4U4UFm47BnxfuB6to5DjwZTHPxwCS3Ag82xvKniV+3RtQaeAj2XwKcrj0vuwTg35YSW+D3c95c2FWasnGFy243xYG2at3yhvJix3ikURZDlB5P3 q9H5w3ox7YHngbqxJgHgbiYiLUcA3xOvrnhgQza/CnqkSU1CGCvwk7xM7na0hA1KndlMZSoxg3gklNljSTclZVNJxKwgihrIYPKnyrxT9zuKHyBTUgjMIVPQ XVX1lusGHWS5yITOpK6Ce+aGp84TiCPwuaSuWIrRWaU= X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78772 Cc: 78772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip Prindeville via Bug reports for GNU grep writes: > It might be useful to have an argument like --glob-regexp to have a > file containing globbing patterns to match (or exclude) against a > stream of filenames. It seems to me what you want is an argument that causes grep to interpret patterns as shell "globs" rather than as regexps. (Note that the glob language is considerably weaker than regexps, and AFAIK they are never called "regexps".) So a better name would be "--glob". I can see value in that. Is there an unambiguous standard for globs? I know that different shells do globbing somewhat differently. Although I notice that grep has these options that take glob arguments, so the code in grep must contain a glob-matcher already, and thus a definition of glob-patterns. --exclude=GLOB --exclude-dir=GLOB --include=GLOB Dale From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 13 15:18:08 2025 Received: (at 78772) by debbugs.gnu.org; 13 Jun 2025 19:18:08 +0000 Received: from localhost ([127.0.0.1]:51466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uQ9uh-0000Oa-OV for submit@debbugs.gnu.org; Fri, 13 Jun 2025 15:18:07 -0400 Received: from mail.redfish-solutions.com ([24.116.100.90]:48796) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uQ9ue-0000O9-5q for 78772@debbugs.gnu.org; Fri, 13 Jun 2025 15:18:05 -0400 Received: from smtpclient.apple (Macmini2-116.redfish-solutions.com [192.168.8.9]) (authenticated bits=0) by mail.redfish-solutions.com (8.18.1/8.18.1) with ESMTPSA id 55DJHxZ6072610 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 13 Jun 2025 13:17:59 -0600 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: bug#78772: Feature request: glob-matching patterns From: Philip Prindeville In-Reply-To: <87ikkzcy68.fsf@hobgoblin.ariadne.com> Date: Fri, 13 Jun 2025 13:17:49 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <3E39E8A1-19E5-4CFD-82A2-A0F808F5D798@redfish-solutions.com> References: <87ikkzcy68.fsf@hobgoblin.ariadne.com> To: "Dale R. Worley" X-Mailer: Apple Mail (2.3826.600.51.1.1) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=redfish-solutions.com; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=bandit; bh=SeR9hfKBIa7+5MoBsLE+BShfPuRvrmY1mKtSToHGm48=; b=A5Xrbf22QKND w1XAKBa5AG7Plrwo4Bt0da6QaITdNweKlhp0878v0a1lISwXpya4ARRQxPpSnOH3 3UsXqYvLKupeqEwrbjzGDcYVz2ZzNM7CB/MTTcDmBlLVUMZnFixaobtvKaqpL+02 AGrvIIJvYvxyq7U1phJNho/cb7n5poBy9TKmF+7OhA/OEjD64LPMDtSRH7wZ/bd/ emIxjt2Fh1JZHUEZqxSliGhRNagGmPoTb6+3OT2QcUXpjDqJ9meFP5yw0a+o0Hwx qL2G1tvx0ac4ESpqoPffS2oElPqC0oSIz1r0iUN/DLxS33Q24QMmGObxOHyM93fp eKHx6zf3wA== X-Scanned-By: MIMEDefang 3.6 on 192.168.8.3 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 78772 Cc: 78772@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > On Jun 13, 2025, at 12:07=E2=80=AFPM, Dale R. Worley = wrote: >=20 > Philip Prindeville via Bug reports for GNU grep > writes: >> It might be useful to have an argument like --glob-regexp to have a >> file containing globbing patterns to match (or exclude) against a >> stream of filenames. >=20 > It seems to me what you want is an argument that causes grep to > interpret patterns as shell "globs" rather than as regexps. (Note = that > the glob language is considerably weaker than regexps, and AFAIK they > are never called "regexps".) So a better name would be "--glob". >=20 > I can see value in that. >=20 > Is there an unambiguous standard for globs? I know that different > shells do globbing somewhat differently. Although I notice that grep > has these options that take glob arguments, so the code in grep must > contain a glob-matcher already, and thus a definition of = glob-patterns. >=20 > --exclude=3DGLOB > --exclude-dir=3DGLOB > --include=3DGLOB >=20 > Dale Corrected. =E2=80=94-glob or =E2=80=94-glob-pattern ... Yes, it seemed like a light lift using the globbing already included. And POSIX globbing is fine.=