From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BC8A158091 for ; Fri, 10 Jun 2022 17:15:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 73DB6E08CA; Fri, 10 Jun 2022 17:15:55 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 51388E08CA for ; Fri, 10 Jun 2022 17:15:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0AAB13413BF for ; Fri, 10 Jun 2022 17:15:54 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 4CFD1303 for ; Fri, 10 Jun 2022 17:15:52 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1654881247.7d05c22848ed37bf5b594a30e56ee2793d1b1afb.ulm@gentoo> Subject: [gentoo-commits] proj/devmanual:master commit in: tools-reference/bash/ X-VCS-Repository: proj/devmanual X-VCS-Files: tools-reference/bash/text.xml X-VCS-Directories: tools-reference/bash/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 7d05c22848ed37bf5b594a30e56ee2793d1b1afb X-VCS-Branch: master Date: Fri, 10 Jun 2022 17:15:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a32da4c5-7c28-4469-ad86-1c7aaa634d4e X-Archives-Hash: d0bb08afa258ef2b65c1a1f096fe58da commit: 7d05c22848ed37bf5b594a30e56ee2793d1b1afb Author: Ulrich Müller gentoo org> AuthorDate: Sat Jun 4 21:24:47 2022 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Fri Jun 10 17:14:07 2022 +0000 URL: https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=7d05c228 tools-reference/bash: Add tables of metacharacters and constructs Parts of this have been taken from the Bash Reference Manual authored by Chet Ramey and Brian Fox. See https://bugs.gentoo.org/829916#c9. Closes: https://bugs.gentoo.org/829916 Reported-by: Alexis gmail.com> Signed-off-by: Ulrich Müller gentoo.org> tools-reference/bash/text.xml | 61 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 7 deletions(-) diff --git a/tools-reference/bash/text.xml b/tools-reference/bash/text.xml index 092e95d..5e541ca 100644 --- a/tools-reference/bash/text.xml +++ b/tools-reference/bash/text.xml @@ -667,18 +667,65 @@ The pattern may contain a number of special metacharacters for pattern matching.

- -tables of bash metachars - + + + + + + + * + Matches any string, including the null string + + + ? + Matches any single character + + + [...] + Matches any one of the enclosed characters + +
CharacterMeaning
+ +

+Refer to the + +Bash Reference Manual for further details and caveats regarding these +characters. +

If the extglob shell option is enabled, a number of additional constructs -are available. These can be extremely useful sometimes. +are available. These can be extremely useful sometimes. In the following +table, a pattern-list is a list of one or more patterns separated by +|.

- -table of extra bash goodies - + + + + + + + ?(pattern-list) + Matches zero or one occurrence of the given patterns + + + *(pattern-list) + Matches zero or more occurrences of the given patterns + + + +(pattern-list) + Matches one or more occurrences of the given patterns + + + @(pattern-list) + Matches one of the given patterns + + + !(pattern-list) + Matches anything except one of the given patterns + +
ConstructMeaning