[Gllug] Match optional character in filename expansion with find

Nix nix at esperi.org.uk
Tue Feb 28 22:07:17 UTC 2012


On 16 Feb 2012, Stuart Sears stated:
> You can specify the regex type you'd like to use - there are a number of
> choices (at least on my version of findutils)
>
> man find:
> -regextype type
>        Changes the regular expression syntax understood by -regex  and
>        -iregex tests which occur later on the command line.  Currently-
>        implemented types are emacs (this is  the  default),  posix-awk,
>        posix-basic, posix-egrep and posix-extended.
[...]
> n.b. these examples all from
> find (GNU findutils) 4.5.10

The -regextype option was introduced in findutils 4.2.24: before that
release, GNU locate's --regex option used POSIX BREs and GNU find
generally used Emacs-compatible regexes except when the maintainer
forgot for a release or two :) (This behaviour was somewhat suboptimal,
hence the addition of tests and -regextype to make it hard to get it
wrong again.)

-- 
NULL && (void)
--
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list