From: Bruno Haible Date: Tue, 6 May 2025 07:57:56 +0000 (+0200) Subject: doc: Document another pitfall of shell pattern matching. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3ff6b64bbe3fd48a61bb0371cfbe44e6f610fb10;p=thirdparty%2Fautoconf.git doc: Document another pitfall of shell pattern matching. * doc/autoconf.texi (Shell Pattern Matching): Mention non-portability of patterns with braces. --- diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 7b156b820..129e80181 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -16280,6 +16280,17 @@ some shells but not others; hence portable scripts should never use Outside the C locale, patterns like @samp{[a-z]} are problematic since they may match characters that are not lower-case letters. +Patterns with braces are, although not specified by POSIX, supported +by most shells. Not so by AIX 7.3 @command{/bin/sh}, though: + +@example +$ @kbd{ls -1 sequence000.c sequence999.c} +sequence000.c +sequence999.c +$ @kbd{ls -1 sequence@{000,999@}.c} +ls: 0653-341 The file sequence@{000,999@}.c does not exist. +@end example + @node Shell Substitutions @section Shell Substitutions @cindex Shell substitutions