On Tuesday 09 Jan 2007 16:54, Hugo Mills wrote:
> On Tue, Jan 09, 2007 at 04:46:20PM +0000, hantslug@??? wrote:
> > In the expression ??[!1-5], for what does the ! stand, or what is its
> > significance?
>
> The relevant documentation for this is in "man bash" -- look for
> the section entitled "Pattern Matching":
>
> * Matches any string, including the null string.
> ? Matches any single character.
> [...] Matches any one of the enclosed characters. A pair of charac
> ters separated by a hyphen denotes a range expression; any
> char acter that sorts between those two characters, inclusive, using the
> current s collating sequence and character set, is matched. If the
> first character following the [ is a ! or a ^ then any character not
> enclosed is matched.
>
> So the glob expression you give above will match two characters,
> followed by another character, which isn't 1, 2, 3, 4 or 5.
So does the exclamation mark mean "that is not"? That was what we couldn't
find - the rest of the expression was fine.
TIA
Lisi