Den 2010-08-10 09:01 skrev Peter Rosin:
BTW, why is ! better than ^ here? Just curious.

I found the answer myself. Quoting the portable shell chapter in the
autoconf manual:

| 11.5 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.

Cheers,
Peter

Reply via email to