Han Boetes <[email protected]> writes: > Hi Otto, > > I figured it out. For portability one should use "!" and not "^" > > It's a "bug" in bash and zsh to allow non POSIX syntax.
I wouldn't word it like that. File: autoconf.info, Node: Shell Pattern Matching, Next: Shell Substitutions, Prev: File System Conventions, Up: Portable Shell 11.7 Shell Pattern Matching =========================== Nowadays portable patterns can use negated character classes like `[!-aeiou]'. The older syntax `[^-aeiou]' is supported by some shells but not others; hence portable scripts should never use `^' as the first character of a bracket pattern. Outside the C locale, patterns like `[a-z]' are problematic since they may match characters that are not lower-case letters. -- jca | PGP : 0x06A11494 / 61DB D9A0 00A4 67CF 2A90 8961 6191 8FBF 06A1 1494
