]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
doc: Document another pitfall of shell pattern matching.
authorBruno Haible <bruno@clisp.org>
Tue, 6 May 2025 07:57:56 +0000 (09:57 +0200)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 6 May 2025 12:05:55 +0000 (05:05 -0700)
* doc/autoconf.texi (Shell Pattern Matching): Mention non-portability of
patterns with braces.

doc/autoconf.texi

index 7b156b82091ba90b9f5c18332820af63f04a20e7..129e801816b7d4d71973ad5ca72738982f19a580 100644 (file)
@@ -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