[Gllug] Match optional character in filename expansion with find
John Edwards
john at cornerstonelinux.co.uk
Thu Feb 16 15:10:53 UTC 2012
On Thu, Feb 16, 2012 at 02:57:21PM +0000, gvim wrote:
> In the `find' command how do I match an optional end character, eg. match all files ending in 'html' or 'htm'?
>
> find . -name '*.ht{m,ml}' -print
>
> ... doesn't work. Perl regexes have ? so what's the equivalent using `find'.
GNU find has a '-regex' option, but the man page says it only
supports Emacs regular expressions and not Perl compatible ones.
--
#---------------------------------------------------------#
| John Edwards Email: john at cornerstonelinux.co.uk |
#---------------------------------------------------------#
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list