Mail Archives: cygwin/2002/07/12/12:24:05
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/
- Raw text -