Re: [Hampshire] wildcards

Top Page
Author: Hugo Mills
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] wildcards

Reply to this message
gpg: failed to create temporary file '/var/lib/lurker/.#lk0x58417100.hantslug.org.uk.30592': Permission denied
gpg: keyblock resource '/var/lib/lurker/pubring.gpg': Permission denied
gpg: Signature made Tue Jan 9 16:54:39 2007 GMT
gpg: using DSA key B2C27BC21C335860
gpg: Can't check signature: No public key
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.

Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 1C335860 from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
           --- I must be musical:  I've got *loads* of CDs ---