This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: find -regex not working?
- From: Randall R Schulz <rrschulz at cris dot com>
- To: "Glen Cordrey" <gcordrey at convera dot com>, <cygwin at cygwin dot com>
- Date: Fri, 12 Jul 2002 09:25:09 -0700
- Subject: Re: find -regex not working?
Glen,
[ Non-Cygwin-specific question and answer. ]
If you want shell-style (a.k.a., "glob") patterns, use find's "-name" or
"-iname" options. When you use "-regexp" you need to use full regular
expressions such as those used by "grep," "egrep," "sed," or Perl.
To get the effect you want, one of these commands is called for:
find -name "MyFile*"
or
find -regex "MyFile.*"
Randall Schulz
Mountain View, CA USA
At 09:10 2002-07-12, Glen Cordrey wrote:
If I understand the find man page, the -regex option isn't working for me.
find -regex 'MyFile.java'
lists the file, but
find -regex 'MyFile*'
doesn't. Am I specifying the regular expression correctly? If so, what
else do I need to do for this to work?
Glen Cordrey
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/